Running classical and post-quantum key exchange in parallel, then combining their shared secrets. The combined key is secure if either component algorithm is unbroken.
Why hybrid: ML-KEM is new. Classical ECDH/X25519 has decades of cryptanalysis. If ML-KEM has an undiscovered weakness, pure post-quantum is broken. Hybrid protects against both the quantum threat (breaking classical) and a potential flaw in the new algorithm.
IETF draft (RFC 9180 hybrid extension):
combined_secret = HKDF-Extract(
salt = classical_shared_secret,
IKM = pq_shared_secret
)Both secrets feed into HKDF. An attacker must break both X25519 and ML-KEM to recover combined_secret.
Q-Safe implementation:
// 1. Classical component
let (our_x25519_private, our_x25519_public) = x25519_keygen();
let classical_secret = x25519_dh(&our_x25519_private, &their_x25519_public);
// 2. Post-quantum component
let (kem_ct, pq_secret) = ml_kem_encapsulate(&their_kem_public_key);
// 3. Combine
let session_key = hkdf_extract(
&classical_secret,
&pq_secret
);
// kem_ct sent to recipient so they can derive pq_secret via decapsulateThe ciphertext transmitted includes both the X25519 public key (for classical DH) and the ML-KEM ciphertext (for PQ KEM). Total overhead vs classical-only: ~1100 bytes of additional ciphertext (ML-KEM-768 level).