शब्दकोश · सुरक्षा

Diffie-Hellman Key Exchange

Diffie-Hellman lets two parties agree on a shared secret over a public channel without ever sending the secret itself, the basis of TLS key exchange.

अपडेट: नवंबर 4, 2026

Diffie-Hellman (DH) is a key exchange method, published in 1976, that lets two parties derive the same shared secret while only exchanging public values. Someone who records the whole exchange still cannot compute the secret efficiently.

Why it matters

TLS needs both sides to hold the same symmetric key before encrypted data flows, and DH is how most connections get it. Each side generates a temporary private value, sends a matching public value, and combines the other side's public value with its own private one. The result is identical on both ends. When the private values are thrown away after each session (the "ephemeral" variants, DHE and ECDHE), the connection gains forward secrecy, meaning stolen server keys cannot decrypt old recordings. TLS 1.3 allows only ephemeral exchanges.

Example

In TLS 1.2 a cipher suite name shows which variant is used:

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

ECDHE is elliptic-curve Diffie-Hellman with ephemeral keys. RSA is only the signature algorithm that proves the server's identity.

Common mistakes

  • Thinking DH encrypts data. It only produces a shared key; a symmetric cipher does the encryption.
  • Using small DH groups, such as 1024-bit, which are considered too weak today.
  • Forgetting that unauthenticated DH is open to a man-in-the-middle, which is why the handshake also signs it.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.