Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. Suppose Alice wants her friends to encrypt email messages before sending them to her. Computers represent text as long numbers ( 0 1 for
Suppose Alice wants her friends to encrypt email messages before sending them to her. Computers represent text as long numbers forA forB for Z so an email message is just a very big number. The RSA Encryption Scheme is often used to encrypt and then decrypt electronic communications
Alices Setup: Alices Setup:
Chooses two prime numbers.
Calculates the product n pq
Calculates m p q
Chooses numbers e and d so that ed has a remainder of when divided by m
Publishes her public key ne
p and q
n pq times
m p q times
If e and d then ed has a remainder of when divided by m
Publish ne
Bob encrypts a message M for Alice:
Finds Alices public key ne
Finds the remainder C when Me is divided by n
Sends ciphertext C to Alice.
Bob encrypts message M :
ne
When is divided by the remainder is C
Sends ciphertext C to Alice.
Alice receives and decrypts ciphertext C:
Uses her private key nd
Finds remainder R when Cd is divided by n
R matches the message M that Bob wanted to send to Alice!
Alice decrypts ciphertext C :
nd
When is divided by the remainder is R
R M the original message from Bob!
Cat wants to send the message M to Alice. Using Alices public and private keys, calculate the ciphertext C and the value for R when Alice recovers the message.
Using the RSAlib.py and AES library, please design the hybrid encryption following the protocol:
s Bob generates the public keysecret key using RSA.
s aAlice generates the session key and uses Bob's public key to encrypt the session key, then she sends the ciphertext to Bob.
b Alice also uses the session key to encrypt the first message: "Hello, Bob" using the AES mechanism.
s a Bob uses the secret key to decrypt the ciphertext and obtain the session key.
b Bob uses the decrypted session key to decrypt the first message and receives "Hello, Bob".
s Bob and Alice will communicate together using the session key.
s After five rounds, Alice will generate the new session key and uses the same protocol to send Bob the new session key.
Please also print on the screen all the steps that are required in the above protocol.
Please write the scenarioprotocol using the hybrid encryption schemes public keysecret key encryption that you knowlearn in reality.
TopicMessage Encryption.py
RSAlib.py
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