Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Cryptography›Diffie-Hellman Key Exchange
Process / pipelineKey agreement protocol

Diffie-Hellman Key Exchange

Diffie-Hellman Key Agreement Protocol · Also known as: DH Key Exchange, Diffie-Hellman Key Agreement

The Diffie-Hellman key exchange, invented by Whitfield Diffie and Martin Hellman in 1976, is a foundational protocol for establishing a shared secret over an insecure communication channel. Two parties who have never previously communicated can use Diffie-Hellman to agree on a symmetric encryption key that an eavesdropper cannot easily derive, even after observing all public exchanges.

ScholarGate
  1. Process / pipeline
  2. v1
  3. 3 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Diffie-Hellman Key Exchange
Digital Signature SchemeRSA Cryptosystem AnalysisSymmetric Key Cryptanaly…TLS Protocol Analysis

When to use it

Use Diffie-Hellman (or elliptic curve variants like ECDH) as the key agreement component in protocols that need to establish symmetric encryption keys over untrusted channels. It is essential in TLS/SSL, IPsec, and secure messaging systems. Modern applications prefer elliptic curve variants (ECDH) because they offer equivalent security with smaller key sizes. Diffie-Hellman protects against passive eavesdropping but not active man-in-the-middle attacks; combine with authentication (e.g., digital signatures or certificates) to prevent impersonation.

Strengths & limitations

Strengths
  • Enables two parties to establish a shared secret without prior communication or secure channels
  • Resists passive eavesdropping; an observer cannot derive the shared secret from public values alone
  • Mathematically well-founded on discrete logarithm hardness, with no known efficient algorithm
  • Flexible: can be combined with authentication methods to prevent man-in-the-middle attacks
Limitations
  • Vulnerable to man-in-the-middle attacks if not authenticated; requires additional signatures or certificates
  • Large key sizes (2048–4096 bits) are needed for modern security, making it slower than alternatives
  • Does not provide forward secrecy by itself; ephemeral variants (DHE) are needed
  • Computation cost is higher than elliptic curve alternatives offering equivalent security

Frequently asked

If I see A and B on the wire, why can't I compute the shared secret?

To compute the shared secret from A and B alone, you would need to find either a such that g^a ≡ A (mod p) or b such that g^b ≡ B (mod p). This is the discrete logarithm problem. For large primes and well-chosen generators, no efficient algorithm is known, making it computationally infeasible to solve.

What is a man-in-the-middle attack on Diffie-Hellman?

An attacker intercepts and modifies the public values exchanged. The attacker can pose as Alice to Bob (establishing a shared secret with Bob) and as Bob to Alice (establishing a separate shared secret with Alice). The attacker then decrypts and re-encrypts all messages, undetected unless authentication is present.

Why do modern systems prefer elliptic curve DH (ECDH) over DH?

ECDH offers equivalent security with significantly smaller key sizes (256-bit ECDH is roughly as secure as 2048-bit DH). Smaller keys reduce computational cost, bandwidth, and storage. Both are secure against current and foreseeable classical algorithms, though quantum computers would break both.

What is ephemeral Diffie-Hellman (DHE) and why is it important?

DHE generates a new Diffie-Hellman key pair for each session instead of reusing the same pair. If a long-term private key is ever compromised, DHE ensures that past session keys remain secure—a property called forward secrecy. TLS 1.3 uses ephemeral ECDH by default.

Sources

  1. Diffie, W., & Hellman, M. E. (1976). New directions in cryptography. IEEE Transactions on Information Theory, 22(6), 644–654. DOI: 10.1109/TIT.1976.1055638 ↗
  2. Menezes, A. J., van Oorschot, P. C., & Vanstone, S. A. (1997). Handbook of Applied Cryptography. CRC Press. link ↗
  3. Boyd, C., & Mathuria, A. (2003). Protocols for Authentication and Key Establishment. Springer-Verlag. DOI: 10.1007/978-3-662-09527-0 ↗

How to cite this page

ScholarGate. (2026, June 3). Diffie-Hellman Key Agreement Protocol. ScholarGate. https://scholargate.app/en/cryptography/diffie-hellman-key-exchange

Related methods

Digital Signature SchemeRSA Cryptosystem AnalysisSymmetric Key CryptanalysisTLS Protocol Analysis

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Digital Signature SchemeCryptography↔ compare
  • RSA Cryptosystem AnalysisCryptography↔ compare
  • Symmetric Key CryptanalysisCryptography↔ compare
  • TLS Protocol AnalysisCryptography↔ compare
Compare side by side →

Referenced by

Digital Signature SchemeRSA Cryptosystem AnalysisTLS Protocol Analysis

Similar methods

Elliptic Curve CryptographyRSA CryptosystemRSA Cryptosystem AnalysisTLS Protocol AnalysisQuantum Key Distribution (BB84)Differential CryptanalysisDigital Signature SchemePost-Quantum Cryptography (Kyber)

Related reference concepts

Diffie-Hellman Key ExchangeKey Exchange and EstablishmentPublic-Key CryptographyElliptic-Curve CryptographyRSA and Integer FactorizationTLS and Secure Channels

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Diffie-Hellman Key Exchange (Diffie-Hellman Key Agreement Protocol). Retrieved 2026-07-21 from https://scholargate.app/en/cryptography/diffie-hellman-key-exchange · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Whitfield Diffie, Martin Hellman
Subfamily
Key agreement protocol
Year
1976
Type
Asymmetric key exchange algorithm
Related methods
Digital Signature SchemeRSA Cryptosystem AnalysisSymmetric Key CryptanalysisTLS Protocol Analysis
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account