Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. Suppose you are developing an RSA public key encryption scheme. You decide to

ID: 3730348 • Letter: 2

Question

2. Suppose you are developing an RSA public key encryption scheme. You decide to use the primes p 11 and q 19, and the semiprime n q = 209 as the modulus for the encryption/decryption (a) Show that e 7 is a valid public encryption key for this choice of p,q and n (b) Use e 7 as your public encryption key and p, q and n as above. Calculate the decryption key d. What is the smallest positive value you could use for d? Now, consider using p-11 and q 5, so n-55, with e-7 and d = 23, while not every calculation must be done by hand, your work should demonstrate use of the fast modular exponentiation (using binary representation of the exponents) that we talked about in class. (c) Encrypt the message "S EN D" (using single-letter blocks). (d) Decrypt the message "Y JARY" (24 09 00 17 24).

Explanation / Answer

2.

(a)

p = 11

q = 19

n = p*q

   = 11 *19

n = 209

e = 7

r = (p-1)(q-1)

   = 10*18

r = 180

e is valid choice because of the following reasons:

gcd(180, 7) = 1

e is relatively prime to 180 and e > 1

(b)

d*e = 1(mod(p-1)(q-1)) = 1 mod r

d*7 = 1 mod 180

d = 103

other values for d are 283, 463.

Thus, the smallest value is 103.

Decryption key = {d,n} = {103, 209}

Encryption key = {e, n} = {7, 209}

(c)

p =11

q = 5

n = p*q

   = 55

e = 7

d = 23

Decryption key = {d, n} = {23, 55}

Encryption key = {e, n} = {7, 55}

Ciphertext : C= (M^e )mod n

Plaintext: M = (C^d )mod n

Assume the value of A is 0 and that Z is 25 to be used for encryption decryption purpose.

S = 18

Ciphertext : C= (M^e )mod n

                        = 18^7 mod 55

                        = 17

                        = R

E = 04

Ciphertext : C= (M^e )mod n

                        = (04)^7 mod 55

                        = 49                            [take mod 25]

                        = 24

                        = Y

N = 13

Ciphertext : C= (M^e )mod n

                        = 13^7 mod 55

                        = 7

                        = H

D = 03

Ciphertext : C= (M^e )mod n

                        = (03)^7 mod 55

                        = 42                             [take mod 25]

                        = 17

                        = R

Hence, the message SEND is RYHR

(d)

p =11

q = 5

n = p*q

   = 55

e = 7

d = 23

Decryption key = {d, n} = {23, 55}

Encryption key = {e, n} = {7, 55}

Assume the value of A is 0 and that Z is 25 to be used for encryption decryption purpose.

Ciphertext : C= (M^e )mod n

Plaintext: M = (C^d )mod n

Y = 24

Plaintext : C= (C^d )mod n

                        = 24^23 mod 55

                        = 19

                        = T

J = 09

Plaintext: C= (C^d )mod n

                        = 09^23 mod 55

                        = 14

                        = O

A = 00

Plaintext: C= (C^d )mod n

                        = 0^23 mod 55

                        = 00

                        = A

R = 17

Plaintext : C= (C^d )mod n

                        = 17^23 mod 55

                        = 18

                        = S

Y = 24

Plaintext : C= (C^d )mod n

                        = 24^23 mod 55

                        = 19

                        = T

Hence, the message YJARY is TOAST

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote