The project uses Simple AES for encryption and decryption, RSA algorithm for digital signature verification.
- Step 1 : run server.py file using "python server.py"
- Step 2 : run client.py file using "python client.py"
- aes_en.py contains the code to encrypt the plaintext using simple AES algorithm as given.
- aes_de.py contains the code to decrypt the ciphertext using simple AES algorithm as given.
- client.py contains socket code for client side.
- server.py contains socket code for server side.
- rsa.py contains the functions for RSA algorithm and converting the text to digest.
- All the functions used are having names as per their uses.
- The Plaintext and cipher key should be Integer.
- The Public and private key parameters (p and q) should be distinct prime numbers for both server and client.
- For a secure RSA Implementation, p and q should be selected greater than 100.
- server.py should be run before client.py.
- Client inputs: Message, Secret Key, Public and Private key parameters for Client
- Server Inputs: Public and Private key parameters for Server.
-
Message Flow:
- Client requests for public key of server.
- Server sends the public key.
- Client sends Ciphertext, Encrypted secret key, Client Signature, Client public key.
- Create Client signature through RSA algorithm, taking Digest from Hash algorithm and client private key as input.
- Create Ciphertext through the AES variant, taking Message and Secret key as input.
- Encrypt Secret key with RSA algorithm, taking Secret key and Server Public key as input.
Client side computation:
-
Server side Computation:
- Decrypt Secret key using RSA algorithm
- Decrypt ciphertext using AES variant
- Create message digest
- Verify Client Signature