Answer:
1) Public key of the receiver is (e, n) is (5, 21) and Private key of the receiver (d, n) is (5 , 21) ,
2) the encryption of a message whose integer equivalent is 12 is 3
3) Decryption of the message ⇒ P = C^d mod n
⇒ P = 3⁵ mod 21
⇒ P = 243 mod 21
⇒ 12
Explanation:
Given that,
p = 3
q = 7
e = 5
1)
Now, n = pq = 3 × 7 = 21
Ø(n) = (p-1) × (q-1) = 2 × 6 = 12
Public key of the receiver is (e, n) is (5, 21)
and private key of the receiver is (d, n)
we have to find 'd' by using the expression
ed = 1 + kmodØ(n)
d = 1 + kmodØ(n) / e
now to get 'd' , we need to choose the least positive integer 'k', by substituting different values of ‘k’ from 0,
so for k =0 , d = (1+0) / 5 = 0.2 not an integer.
for k =1 , d = (1+12) / 5 = 13/5 = 2.6 not an integer.
for k =2 , d = (1+24) / 5 = 5 , now 5 is an integer
So k = 2 and d = 5
Private key of the receiver (d, n) is (5 , 21)
2)
Now the encryption of a message whose integer equivalent is 12?
Encryption of the message ⇒ C = P^e mod n
⇒ C = 12⁵ mod 21
⇒ 248832 mod 21
⇒ 3
3)
Also the decryption gives back the message 12.
Decryption of the message ⇒ P = C^d mod n
⇒ P = 3⁵ mod 21
⇒ P = 243 mod 21
⇒ 12