in Computer Networks
315 views
0 votes
0 votes

#plz check i got 7 ??? but answer is given 2

in Computer Networks
315 views

2 Comments

Please type the question instead of adding image so others can search it.
0
0
it is uploded in jan..
0
0

1 Answer

0 votes
0 votes
Best answer

Here sender and receiver agree to use a modulus n=23 and g=5.

Sender secret key=6

Receiver secret key=15.

Shared key that is used by both sender and receiver in diffiehelman key=$g^{ab}mod p$=$g^{ba}mod p$.

=$5^{15*6}mod 23$

=$5^{90}mod 23$

=$[5^{20}mod 23][5^{20}mod 23][5^{20}mod 23][5^{20}mod 23][5^{10}mod 23]$

First solve $[5^{20}mod 23]$=$[5^{5}mod 23][5^{5}mod 23][5^{5}mod 23][5^{5}mod 23]$

=(20*20*20*20)mod 23=12.

=(12*12*12*12*9)mod 23

=2.

Hence secret key is=2.

selected by

2 Comments

kkk .........but if use calculator than it gives 7
0
0
If power is bigger dont calculate directly it gives wrong results,divide into partitions and then solve.
1
1