Diffie-Hellman Implemented
- The simplest implementation of the protocol uses two integers, a modulus, and a primitive root of the modulus.
- This is how it works.
- Sender and recipient agree on a finite cyclic group of numbers, called G and a generating element g in G.
- g is assumed to be known by everyone, including attackers.
- The sender picks a random natural number a and sends ga to the recipeint.
- The recipient picks a random natural number b and sends gb to the sender.
- The sender computes (gb)a.
- The recipient computes (ga)b.
- Both sender and recipient are now in possession of the group element gab which can serve as the shared secret key.
- This works because (gb)a equals (ga)b.
Is there a Diffie-Hellman example?
© 2006 John Michael Pierobon
Notes