← Back to section · Research & Analysis
We Did the Arithmetic Ourselves: How Many Bytes ML-KEM Adds to a TLS Handshake
Starting from the FIPS 203 parameter tables, a field-by-field derivation of the byte growth in ClientHello and ServerHello under hybrid key exchange — and why it lands exactly on the boundary of TCP's initial congestion window.
There is plenty of discussion about “post-quantum algorithms being too big” and very little quantitative derivation. This article does the unglamorous thing: it takes the numbers from the FIPS 203 parameter tables, drops them into the fields of a TLS 1.3 handshake one at a time, adds everything up, and checks how many extra bytes hybrid key exchange really puts on the wire and what those bytes cost. Every input comes from the standards documents, and anyone can re-check the arithmetic.
The inputs: just three official numbers
The FIPS 203 parameter table gives the encapsulation key (public key) and ciphertext lengths for the three ML-KEM parameter sets: ML-KEM-512 uses 800 and 768 bytes, ML-KEM-768 uses 1184 and 1088 bytes, and ML-KEM-1024 uses 1568 and 1568 bytes. Current deployments mostly use the hybrid of ML-KEM-768 with X25519 (X25519MLKEM768, as defined in the IETF draft), so we follow the 768 line. An X25519 share is only 32 bytes; in hybrid mode the client sends both the X25519 share and the ML-KEM encapsulation key in key_share, and with the group identifier and length fields the key_share extension payload grows from about 36 bytes in classical mode to about 1216 bytes. This step is pure table lookup plus addition — there is no estimation in it at all.
The client’s first flight: the ClientHello delta
A ClientHello body (excluding key_share) is typically 300–600 bytes, depending on SNI, ALPN and the number of extensions. Replacing a 36-byte key_share with a 1216-byte one adds about 1180 bytes, bringing the total ClientHello to roughly 1.5–1.8 KB. The direct consequence is more visible on the UDP side: QUIC Initial packets have a 1200-byte minimum padding and are subject to the anti-amplification limit (a server may send at most three times the bytes it has received before validating the client’s address), so a larger client first packet actually raises the server’s sending allowance. On the TCP side, 1.5 KB is still far below one initial congestion window, so the client’s flight is not the bottleneck. The real accounting is on the server side.
The server’s first flight: adding it up term by term
The server’s ServerHello must carry the hybrid ciphertext: a 32-byte X25519 share plus the 1088-byte ML-KEM-768 ciphertext, a key_share payload of about 1124 bytes. Then come EncryptedExtensions (a few dozen bytes), the Certificate message and CertificateVerify. If the certificate chain is still classical (ECDSA or RSA signatures), a two-level chain’s certificates are about 2–3 KB in total, with signatures of a few hundred bytes. Adding it all up, the server’s first flight totals roughly 4.5–6 KB. Compare TCP’s initial congestion window: mainstream implementations use initcwnd=10, i.e. about 10×1460 ≈ 14.6 KB. Conclusion one: if you swap only the key exchange and not the certificates, the handshake still fits in a single congestion window and usually gains no extra round trip — consistent with observations from large-scale hybrid deployments.
Two easily missed items: fragmentation and middleboxes
The byte budget has two more destinations that are easy to leave out. The first is fragmentation: a single TLS record can carry about 16 KB and handshake messages may span records, but path MTUs and the historical baggage of TLS implementations make oversized handshake messages run into trouble at some middleboxes — a substantial share of the connection failures reported during early hybrid key-exchange deployments were not cryptography problems at all, but middleboxes mishandling an unusually large ClientHello: some firewalls and intrusion-detection devices sized their buffers for classical dimensions and simply drop or reset connections whose key_share exceeds about 1.2 KB. This cost does not appear in the byte total; it appears in the failure rate, so a byte budget should include “failure rate climbs steeply past a certain threshold” as a constraint alongside the totals. The second is session resumption: with PSK session tickets, a resumed handshake sends no certificate chain at all, and the server’s byte budget shrinks dramatically — meaning full and resumed handshakes live in different byte worlds. When assessing the impact of an ML-DSA certificate chain, the full-handshake figures must be weighted by the full handshakes’ share of total traffic, not applied to every connection. Neither correction changes the additive framework; they are reminders that the sum is a lower bound for an ideal channel, and real deployments add the channel’s temperament on top.
A second worked example: ML-KEM-1024 and a three-level chain
A framework earns its keep on a second set of numbers. Switch the parameter set to ML-KEM-1024: encapsulation key and ciphertext both rise to 1568 bytes, the key_share payload is about 1600 bytes, the ClientHello totals roughly 1.9–2.2 KB, the ServerHello key_share is about 1604 bytes, and the server’s first flight (with a classical chain) rises to about 5–6.5 KB — still inside the congestion window, with the same conclusion and a thinner margin. Now make the chain three levels and all ML-DSA-87: each certificate is about 2592+4627+400 ≈ 7.6 KB, the two certificates sent plus CertificateVerify’s 4627-byte signature put the certificate-related portion at about 19.8 KB, and with ServerHello and miscellany the first flight exceeds 21 KB — about half again the initial congestion window, so the handshake needs at least two sending rounds, and the extra round trips go from “one” to “at least one, possibly two”. The two exercises make the same point: upgrading the key-exchange parameter set is linear addition that stays near the window’s edge, while chain depth and signature parameter upgrades multiply — do the arithmetic first, then decide the deployment order.
Where it crosses the line
Swap the certificate chain to ML-DSA as well, and the arithmetic changes immediately: FIPS 204 gives ML-DSA-65 a 1952-byte public key and a 3309-byte signature. In a chain with two certificates below the root, each certificate carries an extra ~2 KB public key, and CertificateVerify adds another ~3.3 KB signature, so the server’s first flight easily exceeds 14.6 KB; the excess can only be sent after an ACK arrives — the handshake pays one extra round-trip time (RTT). This is why the industry’s route is generally “hybrid key exchange first, certificates later”: not because certificates don’t matter, but because the byte budget says the key-exchange delta fits inside the window and the certificate delta does not. The same additive framework applies to other combinations: switch to ML-KEM-1024 by replacing 1088 with 1568, add a third chain level by adding one more term, and recompute.
Assumptions and limits
The conclusions rest on three assumptions: initcwnd=10 (some networks and CDNs use different values); a two-level chain using ML-DSA-65 (substitute the FIPS 204 table values for 44 or 87); and no session resumption or 0-RTT. If the assumptions change, the method does not: every field length is a constant from a standards document, and the handshake byte budget is fundamentally a table-lookup addition problem — which is exactly why it is worth doing the sum yourself.
Sources
- NIST, FIPS 203, Module-Lattice-Based Key-Encapsulation Mechanism Standard, 2024 (parameter tables: encapsulation key and ciphertext lengths).
- NIST, FIPS 204, Module-Lattice-Based Digital Signature Standard, 2024 (ML-DSA public key and signature lengths).
- IETF draft, Post-quantum hybrid ECDHE-MLKEM Key Agreement for TLSv1.3 (key_share encoding for X25519MLKEM768).
- RFC 9000 (the QUIC 3× anti-amplification rule); the Linux TCP convention of initcwnd=10 by default.
Tags: ML-KEMTLSHandshakeByte Budget