Diffie-Hellman
A method that lets two parties agree on a shared secret key over a public network, even while an eavesdropper sees every message they exchange.
In more detail
Each side picks a private number, sends a public value computed from it, then combines the other side's public value with its own private number, and both arrive at the same secret. An eavesdropper sees only the public values, and working backwards, the discrete logarithm problem, is infeasible at proper sizes such as 2048-bit groups. On its own it does not prove who is on the other end, so it must be authenticated, usually with signatures and certificates, to stop a man-in-the-middle attack.
Examples
A = pow(G, a, P) # Alice sends this in the clearalice_secret = pow(B, a, P) # Bob's public value, Alice's private onesame secret: TrueRelated terms
- key exchange — The step in which two parties establish a shared secret key over a network, so they can then encrypt their conversation.
- ECDH — Elliptic curve Diffie-Hellman: key agreement carried out on an elliptic curve, so two parties reach a shared secret using small keys and fast maths.
- MODP group — A published set of public Diffie-Hellman numbers, a large prime and a generator, that anyone can reuse for key exchange.
- man-in-the-middle attack — An attack where someone secretly sits between two parties, relaying and possibly altering their traffic while each thinks it talks to the other.
Taught in
- Asymmetric Cryptography: RSA, ECC & Diffie-Hellman — Cybersecurity Fundamentals, GRC & Cryptography
- Public Key Infrastructure: X.509 Certificates & CAs — Cybersecurity Fundamentals, GRC & Cryptography
- Post-Quantum Cryptography & Key Lifecycles — Cybersecurity Fundamentals, GRC & Cryptography
- Asset Lifecycle Management & Media Sanitization — Cybersecurity Fundamentals, GRC & Cryptography