---
title: "Post-quantum replacement for Diffie-Hellman"
description: "Finite-field Diffie-Hellman is broken by Shor's algorithm. Its replacement is ML-KEM run as an ephemeral key exchange, deployed so far in hybrid with a classical exchange."
url: "https://quantum.zksecurity.xyz/replacements/diffie-hellman/"
site: "PQ Tracker, maintained by zkSecurity"
reviewed: "2026-11-25"
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Diffie-Hellman (Finite-field DH and DHE; MODP and FFDHE groups)

Classical algorithm · Key agreement

Finite-field Diffie-Hellman is broken by Shor's algorithm. Its replacement is ML-KEM run as an ephemeral key exchange, deployed so far in hybrid with a classical exchange.

**zkSecurity** · Reviewed 2026-11-25

## Against a quantum computer

> Shor's algorithm computes discrete logarithms in polynomial time. An attacker who recorded a handshake recovers the session keys from the two public values. Forward secrecy does not help: it protects against later theft of a long-term key, not against solving the exchange itself.

## Replacements

[All algorithms](https://quantum.zksecurity.xyz/algorithms/)

| Algorithm | Standard and status | Public key | Ciphertext or share |
| --- | --- | --- | --- |
| 2048-bit group (In use today) | Broken | 256 | 256 |
| 3072-bit group (In use today) | Broken | 384 | 384 |
| [ML-KEM](https://quantum.zksecurity.xyz/algorithms/ml-kem/) (Run as an ephemeral exchange: the initiator sends an encapsulation key and the responder returns a ciphertext.) | [FIPS 203](https://csrc.nist.gov/pubs/fips/203/final) (Final) | 800 to 1,568 | 768 to 1,568 |
| [HQC](https://quantum.zksecurity.xyz/algorithms/hqc/) (Selected by NIST as the second KEM, on a code-based assumption. No standard or draft yet.) | [FIPS (no number yet)](https://csrc.nist.gov/pubs/ir/8545/final) (Selected, in development) | 2,249 to 7,245 | 4,433 to 14,421 |
| [FrodoKEM](https://quantum.zksecurity.xyz/algorithms/frodokem/) (Unstructured lattices, at the cost of keys and ciphertexts of 10 to 20 KB. Recommended by BSI and ANSSI.) | [ISO/IEC (in progress)](https://frodokem.org/) (Recommended by BSI and ANSSI; not selected by NIST) | 9,616 to 21,520 | 9,720 to 21,632 |

Sizes in bytes, from the smallest to the largest parameter set, without encoding.

## What changes

- A KEM is not symmetric between the parties. One side generates a key pair and the other encapsulates to it, so the order of messages is fixed where Diffie-Hellman allowed either.
- IKEv2 adds ML-KEM as an additional key exchange next to the classical one (RFC 9370).
- ML-KEM-768 sends 1,184 bytes one way and 1,088 the other, against 256 each way for a 2048-bit group.
- Static Diffie-Hellman keys and non-interactive key agreement have no standardized replacement: see ECDH.

## Protocol support

Standards that carry the replacement · [All protocols](https://quantum.zksecurity.xyz/algorithms/#protocols)

| Protocol | Mechanism | Document | Date | Status |
| --- | --- | --- | --- | --- |
| TLS 1.3 | [Hybrid key agreement: X25519MLKEM768, SecP256r1MLKEM768, SecP384r1MLKEM1024](https://quantum.zksecurity.xyz/algorithms/hybrid-tls-x25519mlkem768/) | [RFC 10024](https://www.rfc-editor.org/info/rfc10024) | 2026-08 | Proposed Standard |
|  | ML-KEM key agreement, non-hybrid | [draft-ietf-tls-mlkem](https://datatracker.ietf.org/doc/draft-ietf-tls-mlkem/) | 2026-09-03 | Approved, RFC pending |
| SSH | Hybrid ML-KEM key exchange, including mlkem768x25519 | [RFC 10042](https://www.rfc-editor.org/info/rfc10042) | 2026-08 | Informational |
| IKEv2 / IPsec | ML-KEM key exchange | [draft-ietf-ipsecme-ikev2-mlkem](https://datatracker.ietf.org/doc/draft-ietf-ipsecme-ikev2-mlkem/) | 2026-07-07 | Approved, RFC pending |

## Deadlines

[All jurisdictions](https://quantum.zksecurity.xyz/timelines/)

- [NIST IR 8547 (U.S. federal)](https://quantum.zksecurity.xyz/timelines/nist-ir-8547/): **2030** All quantum-vulnerable public-key algorithms deprecated (RSA, ECDSA, EdDSA, DH, ECDH, MQV at every strength). **2035** All quantum-vulnerable public-key algorithms disallowed under NIST standards.
- [CNSA 2.0 (U.S. national security)](https://quantum.zksecurity.xyz/timelines/cnsa-2-0/): **2027-01-01** CNSA 2.0 algorithms required in all new National Security System acquisitions. **2030-12-31** Equipment and services that cannot support CNSA 2.0 phased out. **2031-12-31** CNSA 2.0 algorithms mandated for use.
- [Australia (ASD)](https://quantum.zksecurity.xyz/timelines/australia-asd-ism/): **2026-12-31** Refined post-quantum transition plan in place. **2028-12-31** Transition of critical systems under way. **2030-12-31** Transition complete; DH, ECDH and ECDSA no longer approved.

## Record

10 entries · [Feed](https://quantum.zksecurity.xyz/feed/)

- 2026-10-28 · Quantum computing · [Alice & Bob estimate RSA-2048 in 3.14 days with about 23,000 cat qubits](https://quantum.zksecurity.xyz/feed/2026-10-28-alice-bob-estimate-rsa-2048-in-3-14-days-with-ab/)
- 2026-03-30 · Quantum computing · [Oratomic preprint: Shor's algorithm with as few as 10,000 neutral-atom qubits](https://quantum.zksecurity.xyz/feed/2026-03-30-oratomic-preprint-shor-s-algorithm-with-as-few-a/)
- 2026-03-30 · Quantum computing · [Google: 256-bit elliptic curves breakable with under 500,000 physical qubits](https://quantum.zksecurity.xyz/feed/2026-03-30-google-256-bit-elliptic-curves-breakable-with-un/)
- 2026-03-07 · Claim refuted · No action required · ['JVG algorithm' claim of RSA-2048 with 5,000 qubits dismissed](https://quantum.zksecurity.xyz/feed/2026-03-07-jvg-algorithm-claim-of-rsa-2048-with-5-000-qubit/)
- 2026-02-12 · Quantum computing · [Pinnacle architecture preprint: RSA-2048 with under 100,000 physical qubits](https://quantum.zksecurity.xyz/feed/2026-02-12-pinnacle-architecture-preprint-rsa-2048-with-und/)
- 2025-05-21 · Quantum computing · [Gidney: RSA-2048 factorable in under a week with under a million noisy qubits](https://quantum.zksecurity.xyz/feed/2025-05-21-gidney-rsa-2048-factorable-in-under-a-week-with/)
- 2024-12-09 · Quantum computing · [Google Willow demonstrates below-threshold surface-code error correction](https://quantum.zksecurity.xyz/feed/2024-12-09-google-willow-demonstrates-below-threshold-surfa/)
- 2024-10 · Claim refuted · No action required · ['D-Wave breaks RSA' coverage traced to factoring of a 22-bit integer](https://quantum.zksecurity.xyz/feed/2024-10-d-wave-breaks-rsa-coverage-traced-to-factoring-o/)
- 2023-08-12 · Quantum computing · [Regev publishes a new quantum factoring algorithm with smaller circuits](https://quantum.zksecurity.xyz/feed/2023-08-12-regev-publishes-a-new-quantum-factoring-algorith/)
- 2022-12-23 · Claim refuted · No action required · [Claim that 372 qubits could threaten RSA-2048 does not survive scrutiny](https://quantum.zksecurity.xyz/feed/2022-12-23-claim-that-372-qubits-could-threaten-rsa-2048-do/)

- **Type**: Key agreement
- **Hard problem**: Discrete logarithm in a finite field
- **Against a quantum computer**: Broken (Shor's algorithm)
- **Recorded data**: Exposed. Recorded handshakes yield the session keys.
- **Replacement**: [ML-KEM](https://quantum.zksecurity.xyz/algorithms/ml-kem/)
- **Used in**: IKEv2 and IPsec, SSH, TLS 1.2 with DHE, and the FFDHE groups of TLS 1.3.

### Specified in

- [RFC 7919, FFDHE groups for TLS](https://www.rfc-editor.org/info/rfc7919)
- [NIST SP 800-56A Rev. 3](https://csrc.nist.gov/pubs/sp/800/56/a/r3/final)

**Sources (1)**

- [RFC 9370, Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2)](https://www.rfc-editor.org/info/rfc9370)

### Audit

zkSecurity audits post-quantum implementations and migrations. [Request an audit](https://www.zksecurity.xyz/contact.html).

### Data

[data.json](https://quantum.zksecurity.xyz/replacements/diffie-hellman/data.json)
