Exercise-skr5200

advertisement
Exercise
1. Users A and B use the Diffie-Hellman key exchange technique with common prime q = 11, a
primitive root α = 2 and user B has private key XB = 8. Show the calculation for questions
below.
i.
If user A has private key XA = 6, what is A’s public key YA?
ii.
What is the shared secret session key?
2. In RSA, the private key consists of {d, n} and the public key consists of {e, n}. Suppose that
user A has published its public key and the value for p and q are given as p = 3, q = 11.
i. Calculate the value of n.
ii. User B wishes to send a message M to user A. Perform encryption if user A public key
e = 3 and the message M = 5.
Answer
1. Users A and B use the Diffie-Hellman key exchange technique with common prime q =
11, a primitive root α = 2 and user B has private key XB = 8. Show the calculation for
questions below.
iii.
If user A has private key XA = 6, what is A’s public key YA?
YA=26 mod 11 = 9
iv.
What is the shared secret session key?
KAB= YB XA mod 11 = 36 mod 11 = 3
KAB= YA XB mod 11 = 98 mod 11 = 3
2. In RSA, the private key consists of {d, n} and the public key consists of {e, n}. Suppose that
user A has published its public key and the value for p and q are given as p = 3, q = 11.
i. Calculate the value of n.
n = p x q = 3 x 11 = 33
ii. User B wishes to send a message M to user A. Perform encryption if user A public key
e = 3 and the message M = 5.
C = Me mod n
= 53 mod 33
= 26
Download