Diffie-Hellman Worksheet
Step
Private!
Only YOU can see this
Public!
EVERYONE can see this
Working "mod n"
"mod n" means "the remainder after dividing by n". For example:
You can use this calculator to work out values mod n:
Another example?
The 12 hour clock works "mod 12". 14 hours after 11 o'clock is:
Private!
Normally only YOUR PARTNER can see this column
(We're showing it to you so you can see how it works.)
You should both have the same secret number! (Find the equations marked with a cross if you don't.)
Why?
A^b = (g^a)^b = g^(ab) = (g^b)^a = B^a.
Since A^b and B^a are equal normally they are also equal mod n
You should both have the same secret number! (Find the equations marked with a cross if you don't.)
Why?
B^a = (g^b)^a = g^(ab) = (g^a)^b= A^b.
Since A^b and B^a are equal normally they are also equal mod n
Anyone listening in can't work out the secret number!