{
  "slug": "ecdh",
  "name": "ECDH",
  "aka": "X25519, X448, P-256, P-384; the basis of ECIES and HPKE",
  "group": "key-establishment",
  "kind": "Key agreement",
  "summary": "Elliptic-curve Diffie-Hellman is broken by Shor's algorithm. Its replacement is ML-KEM, deployed in hybrid with X25519 as X25519MLKEM768 in TLS 1.3 and as mlkem768x25519 in SSH. Non-interactive key exchange has no standardized replacement.",
  "used_in": "TLS 1.3, SSH, IKEv2, WireGuard and other Noise protocols, Signal, HPKE and ECIES.",
  "problem": "Elliptic-curve discrete logarithm",
  "assumption": "ecdlp",
  "quantum": "broken",
  "attack": "Shor's algorithm",
  "exposure": "Shor's algorithm computes elliptic-curve discrete logarithms in polynomial time, and published resource estimates are lower for 256-bit curves than for RSA-2048. Recorded handshakes can be decrypted later. This is the exposure that hybrid key exchange in TLS and SSH already closes.",
  "recorded": "Exposed. Recorded handshakes yield the session keys.",
  "out_label": "Ciphertext or share",
  "sizes": [
    {
      "label": "X25519",
      "pk": 32,
      "out": 32
    },
    {
      "label": "P-256, uncompressed point",
      "pk": 65,
      "out": 65
    }
  ],
  "replace": [
    {
      "slug": "ml-kem",
      "name": "ML-KEM",
      "standard": "FIPS 203",
      "status": "Final",
      "standardized": true,
      "note": "The general-purpose replacement. NIST recommends ML-KEM-768 as the default; CNSA 2.0 requires ML-KEM-1024.",
      "page": "https://quantum.zksecurity.xyz/algorithms/ml-kem/"
    },
    {
      "slug": "hybrid-tls-x25519mlkem768",
      "name": "X25519MLKEM768",
      "standard": "RFC 10024",
      "status": "Proposed Standard",
      "standardized": true,
      "note": "X25519 and ML-KEM-768 combined, for TLS 1.3. The form in which most deployments have replaced ECDH so far.",
      "page": "https://quantum.zksecurity.xyz/algorithms/hybrid-tls-x25519mlkem768/"
    }
  ],
  "alternatives": [
    {
      "slug": "hqc",
      "name": "HQC",
      "standard": "FIPS (no number yet)",
      "status": "Selected, in development",
      "standardized": false,
      "note": "Selected by NIST as the second KEM, on a code-based assumption. No standard or draft yet.",
      "page": "https://quantum.zksecurity.xyz/algorithms/hqc/"
    },
    {
      "slug": "frodokem",
      "name": "FrodoKEM",
      "standard": "ISO/IEC (in progress)",
      "status": "Recommended by BSI and ANSSI; not selected by NIST",
      "standardized": false,
      "note": "Unstructured lattices, at the cost of keys and ciphertexts of 10 to 20 KB. Recommended by BSI and ANSSI.",
      "page": "https://quantum.zksecurity.xyz/algorithms/frodokem/"
    },
    {
      "slug": "classic-mceliece",
      "name": "Classic McEliece",
      "standard": "ISO/IEC 18033-2 Amd 2",
      "status": "New attacks in 2026",
      "standardized": false,
      "note": "Standardized by ISO/IEC in 2026 and under active cryptanalysis since. Not advised for new deployments.",
      "page": "https://quantum.zksecurity.xyz/algorithms/classic-mceliece/"
    }
  ],
  "proposed": [
    {
      "name": "X-Wing",
      "url": "https://datatracker.ietf.org/doc/draft-connolly-cfrg-xwing-kem/",
      "note": "X25519 and ML-KEM-768 combined into one KEM, for use outside TLS. An individual Internet-Draft; the same construction is in a CFRG draft as MLKEM768-X25519."
    },
    {
      "name": "Post-quantum and hybrid KEMs for HPKE",
      "url": "https://datatracker.ietf.org/doc/draft-ietf-hpke-pq/",
      "note": "ML-KEM and hybrid KEM identifiers for HPKE and the protocols built on it. An IETF working group draft."
    },
    {
      "name": "CSIDH, CTIDH",
      "url": "https://eprint.iacr.org/2018/383",
      "note": "Isogeny-based non-interactive key exchange, with 64-byte public keys at the original parameters. Quantum attacks put those parameters below their claimed level; later proposals use primes of 2,000 to 9,000 bits."
    },
    {
      "name": "Swoosh",
      "url": "https://eprint.iacr.org/2023/271",
      "note": "Lattice-based non-interactive key exchange. Public keys of about 220 KB in the passively secure version."
    }
  ],
  "protocols": [
    "RFC 10024",
    "draft-ietf-tls-mlkem",
    "RFC 10042",
    "draft-ietf-ipsecme-ikev2-mlkem",
    "RFC 9980",
    "draft-ietf-lamps-pq-composite-kem"
  ],
  "changes": [
    "No non-interactive key exchange. Two parties can no longer derive a shared key from each other's static public keys alone. Protocols built on that (X3DH, Noise patterns with static keys, WireGuard) are redesigned around KEMs, as Signal did with PQXDH.",
    "Hybrid first. Deployed replacements combine ML-KEM with X25519 or a NIST curve, so that the exchange is no weaker than ECDH if ML-KEM or its implementation fails.",
    "The X25519MLKEM768 key share is 1,216 bytes against 32, so a TLS ClientHello no longer fits in one packet.",
    "ML-KEM encapsulation keys must be checked on receipt (FIPS 203, section 7.2), where X25519 accepts any 32 bytes."
  ],
  "specified": [
    {
      "title": "RFC 7748, Elliptic Curves for Security (X25519, X448)",
      "url": "https://www.rfc-editor.org/info/rfc7748"
    },
    {
      "title": "NIST SP 800-56A Rev. 3",
      "url": "https://csrc.nist.gov/pubs/sp/800/56/a/r3/final"
    }
  ],
  "references": [
    {
      "title": "Signal: the PQXDH key agreement protocol",
      "url": "https://signal.org/blog/pqxdh/"
    },
    {
      "title": "Castryck, Lange, Martindale, Panny, Renes: CSIDH, an efficient post-quantum commutative group action (ePrint 2018/383)",
      "url": "https://eprint.iacr.org/2018/383"
    },
    {
      "title": "Peikert: He Gives C-Sieves on the CSIDH (ePrint 2019/725)",
      "url": "https://eprint.iacr.org/2019/725"
    },
    {
      "title": "Bonnetain, Schrottenloher: Quantum Security Analysis of CSIDH (ePrint 2018/537)",
      "url": "https://eprint.iacr.org/2018/537"
    },
    {
      "title": "Gajland, de Kock, Quaresma, Malavolta, Schwabe: Swoosh, efficient lattice-based non-interactive key exchange (ePrint 2023/271)",
      "url": "https://eprint.iacr.org/2023/271"
    },
    {
      "title": "draft-irtf-cfrg-concrete-hybrid-kems (MLKEM768-X25519)",
      "url": "https://datatracker.ietf.org/doc/draft-irtf-cfrg-concrete-hybrid-kems/"
    }
  ],
  "tags": [
    "rsa-ecc"
  ],
  "timelines": [
    "nist-ir-8547",
    "cnsa-2-0",
    "australia-asd-ism"
  ],
  "page": "https://quantum.zksecurity.xyz/replacements/ecdh/",
  "reviewed": "2026-11-25",
  "standing": "standardized replacement"
}
