← Back to section · Post-Quantum Cryptography
KEMs Compared: The Three Temperaments of ML-KEM, Classic McEliece, and HQC
ML-KEM is not the only post-quantum key encapsulation mechanism: the balanced lattice route, the veteran code-based route, and the backup route's safety margin, compared across sizes, assumptions, and standardization status.
When a system needs post-quantum key establishment, the candidate list is longer than many assume. ML-KEM from FIPS 203 is the default answer, but NIST’s portfolio also seats Classic McEliece and HQC, two players with entirely different temperaments. Only by laying their sizes, assumptions, and status side by side does it become clear why the default is the default — and why the other two seats exist.
Sizes: three completely different shapes
Across ML-KEM’s three parameter sets, public keys (encapsulation keys) run 800 / 1,184 / 1,568 bytes and ciphertexts 768 / 1,088 / 1,568 bytes, with a uniform 32-byte shared secret — a shape tailored for network protocols: an extra kilobyte or two per handshake is entirely acceptable in TLS.
Classic McEliece is the opposite extreme. Its smallest parameter set, 348864, has a public key of 261,120 bytes (about 261 KB), and larger sets exceed 1.3 MB; yet its ciphertext is only 96 bytes, the smallest of any candidate. Key generation is also markedly slower and more memory-hungry. This “enormous public key, tiny ciphertext” shape suits settings where the public key can be distributed in advance and stays fixed, while online traffic is precious.
HQC sits in between, leaning large: at the 128 level, the public key is about 2,249 bytes and the ciphertext about 4,433 bytes — several times ML-KEM, but nowhere near McEliece’s public key. Its private key compresses to a 40-byte seed, a rare lightness among code-based schemes.
Assumptions: lattices, codes, and two ways to use codes
ML-KEM rests on the Module-LWE lattice problem. McEliece and HQC both rest on code-decoding problems, but use them differently: McEliece relies on the Goppa-code system proposed in 1978, with hiding the code structure at its core; HQC relies on decoding quasi-cyclic codes, depends on no hidden structure, and has a cleaner security reduction.
McEliece’s greatest asset is time: for over four decades, generic decoding attacks (information-set decoding) against its parameters have seen only incremental improvements, no breakthrough. The price is that enormous public key — conservatism bought with bandwidth. HQC’s assumption has a shorter history, but it is entirely unrelated to lattices, which is exactly what NIST wanted: in March 2025 NIST announced HQC as the backup to ML-KEM, for the plain reason that if the lattice assumption ever fails, an independent, already-standardized fallback must exist rather than starting over.
Standardization status and deployment reality
ML-KEM is a finished standard (FIPS 203, August 2024) and already in real deployment: the hybrid key exchange in mainstream browsers and CDNs combines it with X25519. Classic McEliece is not in the FIPS series; it follows ISO and other standardization tracks, and appears mostly in specialized systems with extreme conservatism requirements. HQC’s standard (expected to be numbered FIPS 207) is still being drafted; until the final text appears, it is a seat on the roadmap rather than an option that can be procured today.
Speed and implementation ecosystem
Beyond size, the three have distinct performance profiles. ML-KEM’s key generation, encapsulation, and decapsulation are all fast and balanced, with modest memory use, so mature optimized implementations exist from servers to microcontrollers, and mainstream cryptographic libraries and TLS stacks have broadly integrated it — the ecosystem is its most underrated advantage. Classic McEliece actually encapsulates and decapsulates quickly; its weakness concentrates in key generation — slow, memory-hungry — and the public key’s storage and distribution are an engineering burden in themselves; its implementations are far fewer than ML-KEM’s and appear mostly in specialized systems. HQC’s speed is middling, encapsulation and decapsulation slower than ML-KEM but within usable range; its ecosystem is the youngest, with optimized implementations and audit history still early. Beyond benchmark gaps, remember that “is there an audited, constant-time, optimized implementation for my platform” is often the deciding vote.
An easily missed dimension: failure rates and protocol fit
The three also differ invisibly in decapsulation failure rate. ML-KEM and HQC are both designed with negligibly small failure probabilities, so protocol designers usually need no special handling; such details rarely appear in comparison tables, yet they bear directly on the premises of CCA security proofs and on whether implementations need extra checks. Their protocol integration also differs: ML-KEM already has wide deployment of TLS hybrid mode and well-defined group identifiers, while HQC and McEliece are still advancing through protocol identifiers, certificate extensions, and related supporting standards. For a system that must interoperate today, this dimension matters as much as size and speed.
Choosing a tier within a parameter family
Even after choosing ML-KEM, the tier needs its own comparison. The three sets correspond to NIST security categories 1, 3, and 5: ML-KEM-512 targets the cost of breaking AES-128, ML-KEM-768 AES-192, ML-KEM-1024 AES-256. The industry mainstream is the 768 tier — the most balanced in size and security margin, and the one used in browser hybrid exchange; CNSA 2.0 specifies the 1024 tier for national security systems, a regulatory rather than performance choice. The 512 tier suits extremely size-sensitive settings with short-lived data. Viewed together, selection is a two-level decision: first the route (assumption and ecosystem), then the tier (security margin versus size). Only when both levels are costed is KEM selection actually done.
How to choose
For a general system needing interoperability and ready implementations, choose ML-KEM — no contest. Where public keys can be provisioned offline, links are billed by the byte, and you are willing to pay bandwidth for assumption conservatism, evaluate McEliece. The correct use of HQC is to write it into the migration roadmap’s diversity clause: track its standardization progress and reserve algorithm agility for critical systems, rather than replacing ML-KEM with it today. The three are not in an elimination contest; they are the depth NIST deliberately retained.
Tags: KEMML-KEMClassic McElieceHQC