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

1- You need to apply RSA algorithm for given prime numbers p=17 and q=19. Calcul

ID: 3600691 • Letter: 1

Question

1- You need to apply RSA algorithm for given prime numbers p=17 and q=19. Calculate private and public key. Encrypt and decrypt message m=219 to prove that the private and public numbers you calculated are accurate.                                                         

2- You need to apply RSA algorithm for given prime numbers p=17 and q=11. Calculate private and public key. Encrypt and decrypt message m=88 to prove that the private and public numbers you calculated are accurate.                                                         

3- Alice and Bob want to communicate over an insecure medium. Design, on the basis of a shared secret key KAB, a protocol, which enables Alice and Bob to authenticate each other. Assume that the shared secret key KAB is known in advance to both partners. b.) What are the disadvantages related to the use of a shared secret key?     

4- Alice and Bob want to communicate over an insecure medium. Design, on the basis of a shared secret key KAB, a protocol, which enables Alice and Bob to authenticate each other. Assume that the shared secret key KAB is not known in advance to both partners.

Explanation / Answer

1) Given, p=17,q=19 and message M=219

Now,

* calculate n = p*q = 17*19 = 323 (Here,p and q are both primes and p!=q)

* calculate (n) = (p-1)*(q-1) = 16*18 = 288.

* The pair (e,n) is our public key and private key (d,n).

* Select encryption key "e" and "d" is decreption key such that gcd(e,(n))=1 and ed1mod(n).

* ed = 1 mod 288

* 1mod(n) = product of e and d. Set of combinations are 289,577,865,1153,1441,1729,2017,2305,2593,2881 ......

* Consider,any number having exactly two prime factors. Let, 2881 = 43*67 (product of two primes) are values of e and d.

* Now, e=43 we are having "e" such that it is relatively prime to (n) i.e, 43 is relatively prime to 288 (no common factors)

* so,the pair (e,n) is our public key that is used to encrypt i.e, (43,323) is public key.

* Now, private key (d,n) is (67,323)

* Given, Message M=219 (M<n)

so,Ciphertext C = M^e mod n = 219^43 mod 323 = 281

"281" is the ciphertext for plaintext "219".

* Decryption using ciphertext C=281 as M = c^d mod n = 281^67 mod 323 = 219 that is nothing but our pain text M=219.

Hence public key and private key are accurate and that are verified.

2) Given, p=17,q=11 and message M=88

Now,

* calculate n = p*q = 17*11 = 187 (Here,p and q are both primes and p!=q)

* calculate (n) = (p-1)*(q-1) = 16*10 = 160.

* The pair (e,n) is our public key and private key (d,n).

* Select encryption key "e" and "d" is decreption key such that gcd(e,(n))=1 and ed1mod(n).

* ed = 1 mod 160

* 1mod(n) = product of e and d. Set of combinations are 161 321 481 641 801 961 1121 1281 1441 ......

* Consider,any number having exactly two prime factors. Let 161 = 7*23 (product of two primes) are values of e and d.

* Now, e=7 we are having "e" such that it is relatively prime to (n) i.e, 7 is relatively prime to 160 (no common factors)

* so,the pair (e,n) is our public key that is used to encrypt i.e, (7,187) is public key.

* Now, private key (d,n) is (23,187)

* Given, Message M=88 (M<n)

so,Ciphertext C = M^e mod n = 88^7 mod 187 = 11

"11" is the ciphertext for plaintext "88"

* Decryption using ciphertext C=11 as M = c^d mod n = 11^23 mod 187 = 88 that is nothing but our message M=88 .

Hence public key and private key are accurate and that are verified.