Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | Gate IT 2005 | Question 79

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Suppose that two parties A and B wish to setup a common secret key (D-H key) between themselves using the Diffie-Hellman key exchange technique. They agree on 7 as the modulus and 3 as the primitive root. Party A chooses 2 and party B chooses 5 as their respective secrets. Their D-H key is
(A) 3
(B) 4
(C) 5
(D) 6


Answer: (B)

Explanation:
Primitive root = g = 3
Modulus = p = 7
Xa = 2   and   Xb = 5

Ya = 32 mod 7 = 2
Yb = 35 mod 7 = 5

We assume D-H key to be K.

K = YaXb mod 7
K = 25mod 7 = 4
Or
K = YbXa mod 7
K = 52 mod 7 = 4

 
Thus, option (B) is correct.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 07 Sep, 2018
Like Article
Save Article
Similar Reads