Modern Cryptography

Practicals for M.Sc. CS students | (M3022201)

Assignment 13

Due on 31/05/2023

Problem(s)

Part 1

1. Write 2 functions - encRSA_agreement() and decRSA_agreement(), each taking 3 inputs and performing encryption and decryption, respectively, as per the following instructions:

  • There must be a 2-level encryption
  • Three inputs should be: {data, receiver’s public key, sender’s private key} for encryption and {ciphertext, receiver’s private key, sender’s public key}
  • Initially, the message should be encrypted using a normal RSA algorithm (receiver’s public key)
  • Ciphertext should be again encrypted using the sender’s private key
  • Perform similar (2-level) operations for decryption

2. Create two scripts (keyServer_RSA.py and keyClient_RSA.py) using Python socket programming to generate the RSA key pair as per the following method:

  • The client should send two prime numbers (p, q) along with the request
  • The server should generate an RSA key pair and send it to the client as a response.
  • The generator/primitive root should be automatically chosen on the server’s side.

Back to Homepage