edited by
6,939 views
27 votes
27 votes

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

  1. $3$
  2. $4$
  3. $5$
  4. $6$
edited by

3 Answers

Best answer
31 votes
31 votes

For Diffie-Hellman the secret is $(g^{(ab)}) \bmod p,$
where $g$ is the $\text{prime root}$ ( or generator ) and $p$ is the modulus.

So, the answer should be $(3^{10}) \bmod 7=4$.

Answer is B) 4.

edited by
0 votes
0 votes
ans is option (2) i.e k=4

given n=7 r=3 Xa=2 Xb=5

=> Ya=3(pow)2 mod 7 =2

Yb=3(pow)5 mod 7 =5

then d-f key k=Ya(pow)Xb mod 7 or Yb(pow)Xa mod 7

=> k = 2 pow 5 mod 7 =4 (or) 6 pow 2 mod 7 =1
0 votes
0 votes

primitive root to the power privatekey mod Modulus is calculated on both sides

then it is sent accross the channel which is public 

It is an NP complete problem so its computationally imfeasible to tell the actual private key given n,a and the mixture which is sent accross

Whatever which is received at Alice end, it is again raised to the power of private key and modded with the modulus and key is calculated at both ends.

This is diffie hellmen key exchange problem

I have also used FERMAT's LITTLE Theorem to compute 3^10mod7 easily

as a^(n-1)modn is 1

Answer:

Related questions