Question: Needed in python. Write 2 python programs to implement the following: 1. Alice generates a 2048-bit private and public key. 2. Alice and Bob negotiate

Needed in python.

Write 2 python programs to implement the following:

1. Alice generates a 2048-bit private and public key.

2. Alice and Bob negotiate a shared key (Ks) using Diffie-Hellman protocol with p = 23 and g =17.

3. Alice performs steps 4 to 9.

4. Alice hashes the message: To prevent the spread of germs, you should wash your hands with soap and water for at least 20 seconds or use a hand sanitizer with at least 60% alcohol to clean hands.

5. She encrypts the hash using her private key to produce a message digest.

6. Her public key is encrypted using the DES/AES algorithm. The secret DES/AES key (Ks) used is from step 2.

7. The encrypted private key is saved to a file called privatekey.dat while the public key to publickey.dat.

8. The private key is used to encrypt the hash of the message with RSA.

9. Alice then sends the message, message digest and encrypted public key to Bob over a public communication channel.

10. Bob receives the message, message digest and encrypted public key.

11. Bob decrypts the encrypted public key to recover Alice's public key.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!