64.4k views
4 votes
Diffie Helman 1. Abdullah and Aymen get public numbers P = 23, G = 5. Abdullah selected a private key a = 6 and Aymen selected a private key b = 15. a. What is Abdullah public key? b. What is Aymen Public Key? c. What is the shared secret key between Abdullah and Aymen? 2. Suppose that two parties A and B wish to set up a common secret key (D-H key) between themselves using the Diffie Hellman key exchange technique. They agree on 7 as the modulus (P) and 3 as the primitive root (G). Party A chooses 2 and party B chooses 5 as their respective secrets. a. What is the public key for party A? public key for party B? b. What is the c. What is the shared key between the two Parties?

User DMH
by
8.6k points

1 Answer

4 votes

Answer: Therefore, the shared key between Party A and Party B is 4.

Step-by-step explanation:

For Abdullah and Aymen:

Given:

P = 23 (modulus)

G = 5 (primitive root)

a = 6 (Abdullah's private key)

b = 15 (Aymen's private key)

a. To find Abdullah's public key:

Abdullah's public key = G^a (mod P)

Abdullah's public key = 5^6 (mod 23)

Abdullah's public key = 15625 (mod 23)

Abdullah's public key = 16

Therefore, Abdullah's public key is 16.

b. To find Aymen's public key:

Aymen's public key = G^b (mod P)

Aymen's public key = 5^15 (mod 23)

Aymen's public key = 30517578125 (mod 23)

Aymen's public key = 8

Therefore, Aymen's public key is 8.

c. To find the shared secret key between Abdullah and Aymen:

Shared secret key = (Abdullah's public key)^b (mod P) = (Aymen's public key)^a (mod P)

Shared secret key = 16^15 (mod 23) = 8^6 (mod 23)

Shared secret key = 1073741824 (mod 23) = 16

Therefore, the shared secret key between Abdullah and Aymen is 16.

For Party A and Party B:

Given:

P = 7 (modulus)

G = 3 (primitive root)

Party A chooses a = 2 (Party A's private key)

Party B chooses b = 5 (Party B's private key)

a. To find Party A's public key:

Party A's public key = G^a (mod P)

Party A's public key = 3^2 (mod 7)

Party A's public key = 9 (mod 7)

Party A's public key = 2

Therefore, Party A's public key is 2.

b. To find Party B's public key:

Party B's public key = G^b (mod P)

Party B's public key = 3^5 (mod 7)

Party B's public key = 243 (mod 7)

Party B's public key = 5

Therefore, Party B's public key is 5.

c. To find the shared key between Party A and Party B:

Shared key = (Party B's public key)^a (mod P) = (Party A's public key)^b (mod P)

Shared key = 5^2 (mod 7) = 2^5 (mod 7)

Shared key = 25 (mod 7) = 4

User Booyaches
by
7.5k points