← Back to section · Post-Quantum Cryptography
Size and Performance Engineering: ML-KEM's Bandwidth and Compute Bill in Real Systems
What happens when a KEM with roughly 1 KB public keys and ciphertexts is wired into real systems: handshake expansion, connection rates, memory footprint and hardware acceleration — a cost account written for systems engineers.
The compute bill first: surprisingly cheap
Intuition says “post-quantum” comes with a heavy price tag, but ML-KEM’s operation structure is very CPU-friendly: all the heavy work is polynomial multiply–accumulate in the NTT domain over 12-bit integers, which vectorises naturally (mature optimised implementations exist for both AVX2 and NEON). On a modern desktop or server CPU, one ML-KEM-768 encapsulation or decapsulation in an optimised implementation takes on the order of tens of microseconds — an RSA-2048 private-key operation, by contrast, typically sits in the millisecond range, one to two orders of magnitude slower; ML-KEM is slower than X25519, but both live in the “imperceptible inside a handshake” band. For TLS termination and similar workloads, the real CPU heavyweight remains signature verification over the certificate chain, not the KEM.
Two settings do need to watch the compute bill. One is extreme handshake-rate services: with an extra encapsulation (and, server-side, a key generation) per connection, capacity planning must be recalibrated against measured handshakes-per-second rather than inheriting pure-ECDH-era numbers. The other is low-end embedded targets: ML-KEM runs perfectly well on Cortex-M4-class devices (with plenty of public benchmarks), but the RAM footprint (a working set of polynomial vectors measured in kilobytes) and code size (NTT constant tables, the SHA3/SHAKE implementation) need budget reserved up front, and stack depth must be checked against the implementation’s recursion and buffering design.
The size bill next: this is where the money goes
The public-key/ciphertext sizes of the three tiers, in bytes, are: 512 → 800/768, 768 → 1184/1088, 1024 → 1568/1568. In a TLS hybrid handshake that means the client sends a 1184-byte encapsulation key (in place of, or in addition to, a 32-byte X25519 key) and the server returns a 1088-byte ciphertext: roughly 2.3 KB extra per handshake, with three kinds of knock-on effect:
- Fragmentation and round trips: once the ClientHello exceeds a single Ethernet frame or the path MTU it fragments, and the cost of loss and retransmission grows with it; on connections bounded by a small initial congestion window, a large handshake can cost an extra RTT.
- Amplification budgets: QUIC and DTLS enforce strict send-amplification caps before address validation (commonly 3×); a large ciphertext eats the server’s reply budget and can force probe packets and an extra round trip.
- The bandwidth bill: for a platform terminating billions of handshakes a day, 2.3 KB × handshake count is real egress money that belongs in the cost model; for long-lived-connection workloads the handshake share is small and the bill is negligible.
Private-key sizes (1632–3168 bytes) affect only storage and loading, never network traffic, and the shared secret is a constant 32 bytes — zero friction with existing key schedules. That is ML-KEM’s protocol-engineering charm: it inflates “public keys and ciphertexts” only, not “secrets and signatures”.
Knock-on items in certificates and the protocol stack
Swapping key exchange to ML-KEM does not touch the certificate chain (signature algorithms are a separate migration line, and ML-DSA’s size bill is a different account). But several knock-on items are easy to miss: session-resumption tickets and 0-RTT key-derivation inputs do not change length and need no work; in protocols that use a KEM as a component, such as HPKE, the encapsulation key appears inside message headers, so per-message size limits (frame lengths in some IoT protocols, for example) must be re-checked one by one; and key distribution carried over DNS (ECH configs, DNSSEC records) is sensitive to individual record sizes, where a kilobyte-scale public key can trigger TCP fallback or record splitting. A migration assessment that lists “everywhere a public key can appear” and walks the list is much closer to complete than one that stares only at the TLS handshake.
Optimisations: what works, and what not to touch
The effective optimisations all live at the implementation and deployment layers: use implementations with AVX2/NEON optimisation and batch handshake processing; use session resumption on the server side to amortise handshake cost across short-lived repeat connections; and deploy the 768 tier uniformly at the protocol layer to simplify caching and pre-generation (servers can pre-generate pools of key pairs for handshake bursts). The optimisation not to touch is re-tuning parameters: shrinking η or widening compression to “slim down” produces something that is no longer ML-KEM, voiding the security proof and interoperability at the same time — size problems can only be solved by choosing a tier (512/768/1024), never by re-tuning one.
Sideways comparison: is this size big or small within the post-quantum family?
One kilobyte is easy to misjudge in isolation; it reads correctly only against the post-quantum KEM family. The classic code-based scheme Classic McEliece has security to spare but public keys in the hundreds of kilobytes to a megabyte, fitting only the few settings where keys can be distributed in advance; the backup KEM NIST selected — the code-based HQC — has public keys and ciphertexts in the kilobyte range too, a clear step larger than ML-KEM; and hash-based schemes offer no KEM functionality at all. In other words, ML-KEM is the smallest standardised KEM going, and its kilobyte-scale public key is one of the reasons it won and became the default option, not some congenital defect. What engineers actually feel as “bloat” is a reference-frame gap: the previous generation’s X25519 public key is 32 bytes, and a thirty-fold increase lands on protocol stacks optimised for fifteen years around 32 bytes — frame formats, MTU assumptions, amplification limits, middleboxes — so the friction erupts all at once. Priced at that level, the conclusion calms down: ML-KEM is not too big; protocol stacks need one round of adaptation to the new normal of “kilobyte-scale key material” — and once that round is done, size recedes from a migration blocker into an ordinary parameter.
Summary
ML-KEM’s cost structure is “compute is cheap, size is expensive”: microsecond-scale operations are imperceptible to most systems, while the roughly 2.3 KB of handshake growth must be honestly accounted per business shape — measure first in settings with many short connections, expensive bandwidth or tight frame limits, then pick the tier. With that account settled, migration stops being “fear of incidents” and becomes ordinary capacity engineering.
References
- NIST, FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard, 2024. https://doi.org/10.6028/NIST.FIPS.203
- Open Quantum Safe, the liboqs project (reference and optimised ML-KEM implementations). https://github.com/open-quantum-safe/liboqs
Tags: ML-KEMPerformanceKey SizesEngineering Deployment