Consider a Diffie-Hellman scheme with a common prime q = 11 and a primitive root α = 2.

Ali has been hired by alpha company. The company asked him to give demonstration of RSA algorithm to the developers where they further use in the application. Using your discrete mathematics number theory demonstrate the following.

Hint (you can take two prime numbers as 19 and 23 and M/P is 20).

a. Calculate the public key (e,n) and private key (d,n)

b. Encrypt the message using (e,n) to get C

c. Apply (d,n) to obtain M/P back.

d. Write a Java program to demonstrate the keys you generated in a and b, and encrypt the message “20” and then decrypt it back to get the original message.

Question 2: Consider a Diffie-Hellman scheme with a common prime q = 11 and a primitive root α = 2.

a. If user A has public key YA = 9, what is A’s private key XA?

b. If user B has public key YB = 3, what is the shared secret key K?