Diffie-Hellman Key Exchange

Aliases
  • Diffie-Hellman Key Exchange
  • DHKE
Image of Author
September 1, 2023 (last updated September 2, 2023)

https://cryptobook.nakov.com/key-exchange/diffie-hellman-key-exchange

Mixing colors analogy

Mixing colors is a decent analogy, as explained in the cryptobook link above. A and B agree on a color that Z can sniff over the wire, i.e., it's public knowledge. A and B then privately choose private colors, mix the public color with their private colors, and then pass those mixed colors over the wire. Z can see the colors, but can't reverse engineer the unmixed colors (color doesn't work like this as well as the math does, so just trust me on this). Now, after the mixed colors are exchange, A and B privately mix their private colors with the shared mixed color. So they both now have C_pub + C_priv_a + C_priv_b = C_final, and C_final has never been seen by Z, nor can it be derived by Z.

See the discrete logarithm problem for the math backing up the colors analogy.