Public key cryptography – Diffie-Hellman Key Exchange

Pretty good explanation of how this works.