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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started