Skip to content

Peer-to-peer AES-encypted communicator to send files and messages over TCP. Uses Python threads and synchronous/asynchronous queues.

Notifications You must be signed in to change notification settings

zemdom/aes-encryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aes-encryption

Peer-to-peer encypted communicator to send files and messages over TCP. Uses janus sync/async queues to pass data, PyQt5 for GUI, PyCryptodome for AES and asyncio for connection over TCP/IP.

Architecture

image

One peer uses both client and server sockets - client socket is opened each time a message is sent.

Communication protocol

Message header

message header (8B) = message type (4B) + message length (4B) (unsigned long)

Message types

  • INIT - initialize connection - send address on which sender is listening
  • PKEY - send public key
  • SKEY - send session key encrypted with private key
  • PARM - send AES parameters encrypted with private key
  • TEXT - send a batch of text data encypted with AES algorithm
  • FILE - send file data encrypted with AES algorithm:
    • INIT - initialize sending file - send filename
    • PARM - send size of a file in bytes
    • DATA - send a batch of file data
    • QUIT - signalize end of file data sending
  • QUIT - signalize end of connection

Parameters message format

parameters (18B) = algorithm type (1bit) + key size (2bits) + block size (8bit) + cipher mode (2bits) + padding (3 bits) + initial vector (16B)

  • key size - 128, 192 or 256 bit
  • cipher mode - ECB, CBC, CFB or OFB

About

Peer-to-peer AES-encypted communicator to send files and messages over TCP. Uses Python threads and synchronous/asynchronous queues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages