In this assignment, you will gain better understanding of cryptography by implementing a simplified version of RSA encryption and then by using public keys generated by the software, PGP.

computer science

Description

In this assignment, you will gain better understanding of cryptography by implementing a simplified version of RSA encryption and then by using public keys generated by the software, PGP. In the first part of the assignment we will extend the client and server written for Project 1. Now the server process will send its public key to a client process. The client process will then use the public key to send a short session key to the server. The server will decrypt that key, which will eventually be used in a symmetric encryption implementation. The second part of the assignment involves you generating public and private key pairs to send messages to each other with confidentiality


Part A: Simplified RSA Encryption 

As we discussed in class, RSA encryption is computationally expensive and so it is typically used to distribute session keys for a symmetric encryption algorithm. In this assignment we will simulate the existence of two parties, a client and a server, that use public key encryption to exchange a session key that will be used to encrypt data using the simplified AES algorithm. The approach that we are using gives you an insight of how TLS/SSL works. 


Initially the client will say hello to the server and indicate a list of symmetric and asymmetric algorithms that it can support. The server will respond with its own hello message, which includes one symmetric, and asymmetric algorithm that it can support from the list supplied by the client. This hello message will also include the server’s public key as well as a 16-bit pseudorandom string. The client will then send a session key message that will comprise of the “103 SessionKey ” string followed by a symmetric key that is encrypted with the server’s public key, this is in turn followed by the nonce encrypted with the symmetric key algorithm. The server will verify that the received nonce matches what was sent. If there is no match, the server will send the “400 Error” message to the client and close the connection to the client. If there is a match, the server will send the “106 ” message to the client as in Project 1. The server will follow that message with the “107 Polls Open” message. Operation continues as specified for Project 1, except that this time the votes, i.e., the integer for each candidate, will be encrypted using the simplified AES algorithm. The encrypted votes will be sent to the server. The server will decrypt the votes for each client and then return the winning candidate to the client.


Related Questions in computer science category