In this project, using a client-server architecture to show the mechanism, I have implemented encryption-decryption procedure using DES and Diffie-Hellman Key Exchange. The steps regarding the algorithm are already in the files as comments at every step. The algorithms are:
- DES (Data Encryption Standard): It is a symmetric key algorithm which one can crack with brute force in 2^56 iterations.
- Diffie-Hellman Key Exchange: It is the key exchange algorithm in order for the interacting systems to derive to the same shared key that will be used by DES for the encryption-decryption purposes.
The basic steps involved would be:
- The server would be listening for any incoming requests to connect to a client
- The client will send a request for connection and after the TCP 3-Way Handshake, the client and server can start talking to each other one after the other.
- The global parameters are selected by the server and the client is notified of them
- The public-private key pair are generated and public keys are exchanged to get the session key to be used for DES
- The message the sender wants to send is encrypted and encoded and sent to the receiver.
- The receiver would decode and decrypt the message and print the message on the terminal