Hybrid Key Exchange in TLS 1.3: Deploying X25519MLKEM768 Safely
How to deploy hybrid ML-KEM and X25519 key exchange in TLS 1.3: what changes, what breaks, and how to test it before rollout.
Hybrid Key Exchange in TLS 1.3: Deploying X25519MLKEM768 Safely
For most organisations, the first post-quantum change that reaches production will not be a new certificate or a new signature scheme. It will be a different key exchange inside TLS 1.3. This article covers what that change involves, what it costs on the wire, where it tends to fail, and how to roll it out without surprises. It assumes you already know why the migration matters; the focus here is the engineering decision.
Why key exchange comes first
Traffic encrypted today can be recorded and decrypted later if the key exchange protecting it relies on elliptic-curve or finite-field Diffie-Hellman. Signatures do not have the same exposure. A forged signature only helps an attacker who has a quantum computer at the moment of the connection, whereas a recorded session can be attacked years afterwards.
That asymmetry sets the order of work:
- Key establishment protects data with a long confidentiality lifetime. It is urgent now.
- Authentication (certificates, code signing, document signing) is a larger and slower change because it touches PKI, hardware security modules and trust stores. It follows.
NIST standardised the key-encapsulation mechanism in FIPS 203 (ML-KEM, derived from CRYSTALS-Kyber). TLS libraries and browsers have since added support for combining it with a classical exchange. The practical question for architects is no longer whether to adopt ML-KEM, but in what configuration.
How the hybrid construction works
What the specifications say
In TLS 1.3 the client offers one or more named groups in the supported_groups extension and sends key shares for its preferred ones. A hybrid group is simply a new named group. The IETF TLS working group's hybrid design draft describes how a single group can carry two key exchanges at once. The group usually called X25519MLKEM768 combines:
- an ML-KEM-768 encapsulation (FIPS 203), and
- a classical X25519 exchange.
Both shared secrets are concatenated and fed into the TLS 1.3 key schedule where the ordinary (EC)DHE secret would normally go. An attacker must therefore break both components to recover the session keys. NIST SP 800-56C Revision 2 allows additional shared secrets to be combined in key derivation, which is the basis on which a FIPS-validated classical component can sit alongside ML-KEM.
Two cautions apply. First, the earlier experimental group X25519Kyber768Draft00 used a pre-standard version of Kyber and a different component ordering. It is not interoperable with the final X25519MLKEM768 group, so any configuration that still references it should be reviewed. Second, the TLS group definitions remain IETF work products rather than NIST standards, so confirm the current draft or RFC status when you document your design.
What it costs on the wire
ML-KEM-768 sizes are fixed by FIPS 203: an encapsulation key of 1,184 bytes and a ciphertext of 1,088 bytes. Adding the 32-byte X25519 values gives:
- Client key share: 1,184 + 32 = 1,216 bytes (versus 32 for X25519 alone)
- Server key share: 1,088 + 32 = 1,120 bytes (versus 32)
Compute cost is modest for ML-KEM on modern CPUs. The visible change is bandwidth and packet size, and that is where most deployment problems come from.
Hybrid, classical or pure: choosing a configuration
| Option | Protects against harvest-now-decrypt-later | Key share size (client / server) | Main advantage | Main drawback |
|---|---|---|---|---|
| Classical X25519 only | No | 32 / 32 bytes | Smallest, universally supported | Vulnerable to a future quantum adversary |
| Hybrid X25519MLKEM768 | Yes | 1,216 / 1,120 bytes | Secure if either component holds; wide client and library support | Larger handshake; TLS group definition still tied to IETF process |
| Pure ML-KEM-768 | Yes | 1,184 / 1,088 bytes | Simpler; no classical dependency | Relies solely on a relatively young algorithm family |
| Pure ML-KEM-1024 | Yes | 1,568 / 1,568 bytes | Highest FIPS 203 parameter set; aligned with CNSA 2.0 | Larger still; narrower deployment support |
The policy landscape is not uniform. The NSA's CNSA 2.0 suite specifies ML-KEM-1024 for national security systems without requiring a hybrid. European agencies including ANSSI and BSI have favoured hybrid approaches during the transition, and the EU's coordinated PQC roadmap points organisations towards early, risk-based adoption. If you operate under a specific regulator or supply a government customer, check which of these applies before standardising internally.
For an ordinary enterprise with no such constraint, hybrid is the sensible default. It costs little more than pure ML-KEM and limits the downside if a flaw is found in either component.
Worked example: a mid-sized bank's public edge
Consider a hypothetical retail bank. Its estate has three layers that touch TLS:
- A CDN or reverse proxy terminating customer-facing connections.
- A web application firewall and load balancer in the data centre.
- Internal service-to-service traffic through a service mesh.
Step 1: size the added traffic. Each new hybrid handshake adds roughly (1,216 − 32) + (1,120 − 32) = 2,272 bytes. If the edge handles 5 million new handshakes per day (an illustrative figure, not a benchmark), the extra data is 5,000,000 × 2,272 ≈ 11.4 GB per day. Resumed sessions add nothing. This is negligible for bandwidth, which tells the team the cost concern is packet behaviour, not capacity.
Step 2: classify the data. Customer sessions carry authentication tokens and account data with a short lifetime. Inter-bank file transfers and archived statements are different: some data must remain confidential for many years. The team orders the work accordingly, starting with the channels carrying long-lived confidential data, then the customer edge.
Step 3: check every device in the path. The CDN supports the hybrid group. The WAF is two firmware versions behind and its TLS inspection feature terminates and re-originates connections using its own library. The team records the WAF as a dependency requiring a vendor upgrade, rather than discovering it in production.
Step 4: stage the rollout. The team enables the hybrid group in test, then for a small percentage of external traffic, with classical X25519 retained as a fallback group. Handshake failure rates are tracked against a baseline. Only after stable results do they widen the percentage.
The outcome is not a clever technique. It is a short inventory, a sizing check and a staged change, which is how most successful key exchange migrations proceed.
What breaks, and how to find out first
Larger ClientHello messages
A typical TLS ClientHello fits comfortably within a single packet. With a 1,216-byte hybrid key share, it can exceed a single TCP segment on a standard 1,500-byte path. Devices that assume the whole ClientHello arrives in the first packet, such as some firewalls, intrusion prevention systems and load balancers, may drop or misparse it. Early large-scale deployments saw this kind of intolerance in a small share of network paths, which is why test coverage across real client networks matters.
TLS inspection and proxies
Any device that intercepts TLS has its own library and its own group preferences. If it does not support the hybrid group, it will normally negotiate classical X25519 with the client and silently remove the protection. Your configuration may look correct while your traffic is not actually protected. Verify negotiated groups from logs or packet captures rather than assuming.
Hardware and FIPS boundaries
If your policy requires FIPS-validated cryptographic modules, confirm whether the module in use includes validated ML-KEM, and how the classical component is treated. HSMs and appliance vendors are at different stages. Record the status in your cryptographic inventory rather than in an email thread.
A minimal test plan
- Enable the hybrid group in a non-production environment with the same middleboxes as production.
- Test from a range of client networks, including corporate proxies and mobile carriers.
- Capture handshakes and confirm the negotiated group, not just that the connection succeeded.
- Measure handshake latency and failure rate against the classical baseline.
- Define a rollback: removing the group from the server preference list should restore classical behaviour without a redeployment.
Where this sits in the wider migration
Hybrid key exchange addresses one category of exposure. It does not replace the inventory, governance or prioritisation work that a full programme requires, and it does not touch certificates. Treat it as an early, bounded win that also teaches your team how to handle group negotiation, larger handshakes and cross-vendor dependencies, all of which recur when signatures follow. NIST IR 8547 sets the long-term deprecation path for the classical algorithms; the hybrid period is how you cross that gap without a hard cutover.
Where IQCDL fits
IQCDL assesses whether practitioners can make these decisions in context: choosing a configuration, identifying dependencies, and testing before rollout. You can check your current level with the readiness assessment, explore role-based training in our programmes, and see how our competency framework maps to published NIST, ISO/IEC, ETSI and ENISA material on the standards page.
FAQ
Does hybrid key exchange make my TLS connections quantum-safe end to end?
It protects the confidentiality of the session against a future quantum adversary, which is the harvest-now-decrypt-later risk. It does not change authentication. Certificates and signatures remain classical until you deploy ML-DSA (FIPS 204) or SLH-DSA (FIPS 205) and your PKI supports them.
Should we use hybrid or pure ML-KEM?
For most organisations, hybrid is the pragmatic default during the transition because it stays secure if either component is broken. Pure ML-KEM-1024 is what the NSA's CNSA 2.0 suite specifies for national security systems. Check which regulator or customer requirements apply to you before choosing.
Will hybrid key exchange break existing clients?
Not by design. TLS 1.3 lets a client offer several groups, and a server that does not support the hybrid group selects another. Breakage usually comes from middleboxes, load balancers or inspection devices that mishandle the larger ClientHello, which is why pre-production testing matters.
Do we need to wait for final IETF publication before deploying?
The ML-KEM algorithm itself is final in NIST FIPS 203. The TLS hybrid group definitions have been progressing through the IETF and are already implemented in major browsers and libraries. Many organisations deploy now, behind configuration that lets them adjust group preferences if the specification changes.