Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 1.09 KB

File metadata and controls

25 lines (22 loc) · 1.09 KB

Socket-Communication

Unencrypted.py

Set Up:

python3 unencrypted.py [--s|--c hostname]

  • --s configures the current machine as the host (on port 9999)
  • --c hostname configures the current machine as a client and (tries) to connect to hostname (on port 9999)
  • --s must be running before --c runs

About:

  • Uses Python sockets library
  • No form of encryption (data can be eavesdropped, changed during transit, and host/clients may or may not be authorized

Encrypted.py

Set Up:

python3 encrypted.py [--s|--c hostname] [--confkey K1] [--authkey K2]

  • --s configures the current machine as the host (on port 9999)
  • --c hostname configures the current machine as a client and (tries) to connect to hostname (on port 9999)
  • --confkey K1 specifies the confidentiality key
  • --authkey K2 specifies the authorization key

About:

  • Uses Python sockets and Crypto libraries
  • Uses AES-256 for encryption and HMAC (using SHA-256) for authentication
  • All communication is fully encrypted (and is decrypted once received)
  • Host/Clients are checked to ensure authorization