DH Protocol Intelligence
Explore the mathematical foundation of secure key exchange over insecure channels. Visualize how private exponents derive a shared symmetric secret.
Alice
Bob
The DH Logic
Diffie-Hellman (DH) is a method of securely exchanging cryptographic keys over a public channel. It is one of the earliest practical examples of public key exchange implemented within the field of cryptography.
Computational Complexity: The security of DH relies on the difficulty of the Discrete Logarithm Problem. While it is easy to calculate `A = g^a mod p`, it is computationally nearly impossible to reverse-engineer `a` from `A` when `p` is a very large prime number.
Perfect Forward Secrecy: In modern implementations like ECDHE, new DH keys are generated for every session. If the server's long-term private key is later compromised, older sessions remain secure because the session-specific DH keys were never stored.