Answered step by step
Verified Expert Solution
Link Copied!

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 (01 forA,02 forB,...26 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 1)(q 1).
Chooses numbers e and d so that ed has a remainder of 1 when divided by m.
Publishes her public key (n,e).
p =11 and q =3.
n = pq =11\times 3=33.
m =(p 1)(q 1)=10\times 2=20.
If e =3 and d =7, then ed =21 has a remainder of 1 when divided by m =20.
Publish (n,e)=(33,3).
Bob encrypts a message M for Alice:
Finds Alices public key (n,e).
Finds the remainder C when Me is divided by n.
Sends ciphertext C to Alice.
Bob encrypts message M =14 :
(n,e)=(33,3).
When 143=2744 is divided by 33, the remainder is C =5.
Sends ciphertext C =5 to Alice.
Alice receives and decrypts ciphertext C:
Uses her private key (n,d).
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 =5:
(n,d)=(33,7).
When 57=78125 is divided by 33, the remainder is R =14.
R =14= M, the original message from Bob!
Cat wants to send the message M =12 to Alice. Using Alices public and private keys, calculate the ciphertext C, and the value for R when Alice recovers the message.
2. Using the RSA_lib.py and AES library, please design the hybrid encryption following the protocol:
s1. Bob generates the public key/secret key using RSA.
s2. a.Alice 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.
s3. 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".
s4. Bob and Alice will communicate together using the session key.
s5. 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.
3. Please write the scenario/protocol using the hybrid encryption schemes (public key/secret key encryption) that you know/learn in reality.
Topic3_Message Encryption.py
RSA_lib.py

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions