next up previous
Next: Some Quotes Up: Lecture 8: Public-key Crypto Previous: Public-key Cryptography

The Diffie-Hellman Key Exchange Protocol

Nikita and Michael agree on a prime number $ p$ and an integer $ g$ that has order $ p-1$ modulo $ p$. (So $ g^{p-1}\equiv 1\pmod{p}$, but $ g^{n} \not\equiv 1\pmod{p}$ for any positive $ n<p-1$.) Nikita chooses a random number $ n<p$, and Michael chooses a random number $ m<p$. Nikita sends $ g^n\pmod{p}$ to Michael, and Michael sends $ g^m\pmod{p}$ to Nikita. Nikita can now compute the secret key:

$\displaystyle s = g^{mn} = (g^m)^n \pmod{p}.
$

Likewise, Michael computes the secret key:

$\displaystyle s = g^{mn} = (g^n)^m \pmod{p}.
$

Now Nikita uses the secret key $ s$ to send Michael an encrypted version of her critical message. Michael, who also knows $ s$, is able to decode the message.

Meanwhile, hackers in The Collective see both $ g^n\pmod{p}$ and $ g^m\pmod{p}$, but they aren't able to use this information to deduce either $ m$, $ n$, or $ g^{mn}\pmod{p}$ quickly enough to stop Michael from thwarting their plans. Yeah!

The Diffie-Hellman key exchange is the first public-key cryptosystem every published (1976). The system was discovered by GCHQ (British intelligence) a few years before Diffie and Hellman found it, but they couldn't tell anyone about their work; perhaps it was discovered by others before. That this system was discovered independently more than once shouldn't surprise you, given how simple it is!



Subsections
next up previous
Next: Some Quotes Up: Lecture 8: Public-key Crypto Previous: Public-key Cryptography
William A Stein 2001-09-28