Diffie-Hellman
Diffie-Hellman is a key exchange protocol based on the hardness of the discrete logarithm problem.
Public Data
Choose a prime and a primitive root modulo .
Key Exchange
Alice chooses a secret integer and sends
Bob chooses a secret integer and sends
The modular exponentiations in this protocol are carried out using Binary Exponentiation.
Alice computes
and Bob computes
So both obtain the shared secret
Security Idea
An eavesdropper sees and , but computing from this information is believed to be hard.
This is called the computational Diffie-Hellman problem.