Navigate to solutions folder and run the following commands:
pip install -r requirements.txt
run testAES.py to see the results.
run testDH.py to see the results.
run server.py and client.py to see the results.
- RSA Key Exchange: RSA is used to exchange the AES key between the client and the server. The keys are generated on client side. The client and passes the public key to the server. The server then uses the public key to encrypt p, g, A and send those to the client. Again, the opposite is done while sending B from client to server. Run testRSA.py to see the results.
- RSA Authentication: While sending data from one to the other, there is no way for the receiver to know if the sender is actually the one whose data the receiver is expecting. RSA can be used to authenticate the sender. The sender can sign the data with its private key and the receiver can verify the signature with the sender's public key. Details can be found here in the
Signing Messages
section.