HPKE
Hybrid Public Key Encryption from RFC 9180, which combines a key encapsulation mechanism, HKDF and an AEAD to encrypt to a public key. As standardised it uses Diffie-Hellman KEMs over X25519, X448 or NIST curves, and it is used in Messaging Layer Security and TLS Encrypted Client Hello.
In short
What a quantum computer changes.
- Quantum effect
- Broken by Shor's algorithm
- Family
- Classical public keyRests on elliptic-curve discrete logarithm.
- What it means
- Shor's algorithm, run on a large, fault-tolerant quantum computer, factors large numbers and solves discrete logarithms, including those on elliptic curves, far faster than any known classical method. The security of this algorithm rests on elliptic-curve discrete logarithm, which is one of those problems. Anyone with such a machine could work out a private key from the matching public key. Signatures could then be forged, and data protected by a key exchange built on this algorithm could be decrypted, including traffic recorded now and kept for later. Longer keys do not fix this. The usual answer is to plan a move to a post-quantum or hybrid scheme.
This describes the family, not any project that uses it.
12 in the catalogue
Packages that provide it
| Package | Provides |
|---|---|
| hpke-jsnpm | Hybrid Public Key Encryption (RFC 9180) on top of WebCrypto, with DHKEM over P-256, P-384, P-521, X25519 and X448, HKDF-SHA-2, and AES-GCM or ChaCha20-Poly1305. |
| @hpke/corenpm | Core Hybrid Public Key Encryption (RFC 9180) module on WebCrypto, with DHKEM over P-256, P-384, P-521 and X25519, HKDF-SHA-2 and AES-GCM. |
| @hpke/dhkem-x25519npm | HPKE extension module providing DHKEM(X25519, HKDF-SHA256) for @hpke/core. |
| @hpke/chacha20poly1305npm | HPKE extension module providing the ChaCha20-Poly1305 AEAD for @hpke/core. |
| @hpke/ml-kemnpm | HPKE extension module providing ML-KEM-512, ML-KEM-768 and ML-KEM-1024 as KEMs for @hpke/core. |
| @hpke/hybridkem-x-wingnpm | HPKE extension module providing X-Wing, a hybrid KEM combining ML-KEM-768 and X25519, for @hpke/core. |
| boringcrates.io | Rust bindings to BoringSSL with TLS support, RSA, DSA, Diffie-Hellman, ECDSA and ECDH, Ed25519 and X25519, ML-KEM, ML-DSA, HPKE, AEAD ciphers, hashes, HMAC and key derivation. |
| libcruxcrates.io | Re-export crate for the libcrux library of formally verified implementations, including ML-KEM, ML-DSA, X25519, P-256 ECDSA and ECDH, Ed25519, RSA-PSS, AES-GCM, ChaCha20-Poly1305, SHA-2, SHA-3, BLAKE2, HMAC, HKDF and HPKE. |
| orioncrates.io | Pure Rust library offering ML-KEM, ML-DSA, X-Wing, HPKE, X25519, (X)ChaCha20-Poly1305, BLAKE2b, BLAKE3, SHA-2, SHA-3, HMAC, HKDF, PBKDF2, Argon2 and scrypt. |
| dryoccrates.io | Pure Rust libsodium-compatible library with crypto_box, secretbox, Ed25519 signatures, BLAKE2b, SHA-2, SHA-3, HMAC, HKDF, Argon2 password hashing, ML-KEM-768, X-Wing and HPKE sealed boxes. |
| rustlscrates.io | TLS 1.2 and TLS 1.3 library in Rust whose cryptography comes from a pluggable provider, aws-lc-rs by default or ring. |
| hpkecrates.io | Pure Rust Hybrid Public Key Encryption (RFC 9180) with X25519 and NIST P-curve DHKEMs, ML-KEM and X-Wing KEMs, HKDF or SHAKE KDFs and AES-GCM or ChaCha20-Poly1305. |
1 listed
Sources
- RFC 9180: Hybrid Public Key Encryptionrfc-editor.orgRetrieved 3 December 2026
Full record
- Identifier
- hpke
- Kind
- public-key-encryption
- Family
- Classical public key
- Rests on
- elliptic-curve discrete logarithm
- Quantum effect
- Broken by Shor's algorithm
Standards
- RFC 9180Hybrid Public Key EncryptionIRTF (CFRG), informational, published 1 February 2022Checked 3 December 2026