- Alice chooses a random value
**x**. - Alice sends
**g**to Bob.^{x}mod n - Bob chooses a random value
**y** - Bob sends
**g**to Bob.^{y}mod n - Alice computes
**g**as^{xy}mod n**(g**^{x}mod n)^{y}mod n< Bob computes g

^{xy}mod n as (g^{y}mod n)^{x}mod n

__Why do we care about Diffie-Hellmen__

Simply stated, if you are involved in any sort of Virtual Private Network (VPN), you are probably using Diffie-Hellman, even if you didn't realize it. If that VPN is operating on the IPSec standard, then Diffie-Hellman is certainly in use. To follow the standards trail for key management in IPSec, we begin with the overall framework called Internet Security Association and Key Management Protocol (ISAKMP; see RFC 2408). Within that framework is the Internet Key Exchange (IKE) protocol (see RFC 2401). IKE relies on yet another protocol known as OAKLEY and it uses Diffie-Hellman as described in RFC 2412. It is an admittedly long trail to follow, but the result is that Diffie-Hellman is, indeed, a part of the IPSec standard.

(Figure 1) Diffie-Hellman Key Exchange

Here are a few links to some sites of interest.