← Back to section · Post-Quantum Migration

Replacing Key Exchange: From RSA Key Transport and ECDH to ML-KEM

Key exchange is the first stop of the replacement programme: RSA key transport has no forward secrecy, static DH provides no authentication, and ECDH rests entirely on the discrete logarithm. The replacement path runs on ML-KEM combined with classical algorithms in hybrid constructions, with landed negotiation mechanisms in TLS, SSH and IKEv2.

Published 22 November 2026 · 5 min read · PQ Frontier

Replacing Key Exchange: From RSA Key Transport and ECDH to ML-KEM
AI-generated site artwork
Video explainer · Replacing RSA & ECC: Strategy and Priorities

Key exchange inside an organisation runs on three classical primitives: RSA key transport, finite-field DH and elliptic-curve ECDH. Replacing them is the most time-critical segment of the whole migration, and the reason lies not in the algorithms but in the attack model: an adversary can record encrypted traffic today, warehouse it, and decrypt it later once a cryptographically relevant quantum computer exists. Key exchange therefore cannot be sequenced by system retirement order; it must be sequenced by the confidentiality lifetime of the data — the longer the data must stay secret, the earlier the key exchange carrying it must be replaced.

First, see what is wrong with each legacy construction

RSA key transport (the RSA key exchange suites of TLS 1.2) has the client generate the pre-master secret and encrypt it under the server’s RSA public key. It carries two structural defects: it has no forward secrecy, so a single server private-key compromise retroactively exposes every recorded session; and decryption-oracle attacks of the Bleichenbacher family keep resurfacing against it. TLS 1.3 removed static RSA key transport entirely, so for systems still running TLS 1.2 RSA suites, the replacement action is really two actions in one — a protocol upgrade and an algorithm replacement.

Static DH, with a fixed public key baked into a certificate, offers neither forward secrecy nor practical rotation and has long been abandoned by mainstream protocols. Ephemeral DH/ECDH (DHE, ECDHE) provides forward secrecy and is today’s on-line workhorse, but its security rests wholly on the discrete logarithm problem, against which Shor’s algorithm is decisive. ECDH is not “not strong enough”; its underlying assumption fails — longer keys and different curves cannot save it, only a change of primitive can.

The replacement target: ML-KEM in a hybrid construction

ML-KEM, standardised in FIPS 203, is the destination for key exchange: ML-KEM-768 provides a security margin around the AES-128 level with a 1,184-byte public key and a 1,088-byte ciphertext; ML-KEM-1024 targets a higher level, and CNSA 2.0 specifies ML-KEM-1024 for national security systems. In production, however, the deployed form is not “pure ML-KEM” but hybrid key exchange: the shared secrets of X25519 (or P-256) and ML-KEM are fed together into the key derivation function. X25519MLKEM768, already widely deployed in TLS and enabled by default in browsers and major CDNs, is exactly this construction.

The logic of the hybrid is risk hedging. Lattice cryptography has a short standardisation history; if a classical attack on ML-KEM ever appears, the X25519 half still stands. Conversely, when a quantum computer arrives, the ML-KEM half still stands. If either half holds, the session key holds. The cost — a little over a kilobyte more in the handshake and one extra combining step in key derivation — is well within tolerance.

Parameter-set selection is also part of replacement strategy. ML-KEM-512 has a comparatively thin security margin and is outside the CNSA 2.0 selection, so production systems have no reason to choose it; ML-KEM-768 is the current default tier, with the best balance of size and margin, and the TLS hybrid groups are built on it; ML-KEM-1024 is reserved for high-assurance and long-lifetime scenarios and for systems aligning with CNSA 2.0. The common selection error is “1024 everywhere, once and for all”: the extra bytes get amplified through certificate chains and handshakes, while the security gain is unnecessary for most business data. The correct discipline is to select by confidentiality lifetime — 1024 for core data beyond ten years, 768 for the rest — and to record the reasoning in the negotiation policy rather than scattering it across each system’s local configuration.

Landing paths, protocol by protocol

TLS: upgrade to TLS 1.3 and enable the hybrid groups first. Server-side this usually means upgrading the cryptographic library and configuration, not replacing certificates — key exchange and certificate signatures are decoupled in TLS, which is the fundamental reason TLS replacement can precede PKI replacement. SSH: OpenSSH has enabled first sntrup761x25519 and then mlkem768x25519-sha256 hybrid key exchange by default in successive releases; upgrading server and client versions is sufficient, and existing host keys are unaffected. IKEv2/IPsec: RFC 9370 defines a multiple key exchange framework that runs classical and post-quantum components in parallel within one negotiation, while the post-quantum pre-shared keys of RFC 8784 are a transitional option well suited to hardening site-to-site tunnels early.

Sequence by exposure and data lifetime: internet-facing TLS endpoints, inter-organisation links, and the channels carrying backup and archive data move first. East-west internal traffic can follow, but not indefinitely — internal traffic can also be recorded, merely at higher collection cost.

The key-exchange surfaces most easily missed

Replacement lists most often miss not the public website but the encrypted channels that “have always run and nobody looks at any more”. The first class is database links: primary-replica replication, cross-site backup synchronisation and application-to-database TLS connections carry precisely the organisation’s most core, longest-lived data, yet sit in the infrastructure layer and outside the web team’s replacement view. The second class is internal service-to-service traffic: mutual TLS in service meshes, RPC frameworks and message queues, much of it switched on at deployment and never touched again, still negotiating classical-only suites. The third class is long-lived connections baked into devices and clients: VPN clients built into firmware, certificate-pinning logic in desktop and mobile applications, vendor SDK connection libraries — their upgrade tempo is not controlled by the server side, so before switching servers, confirm these long-tail peers can negotiate the hybrid groups.

The anti-omission method is to change the inventory unit from “by system” to “by flow”: every encrypted channel carrying data with a confidentiality lifetime, whichever team owns it and whichever layer it runs on, enters the same replacement table. Completion is also measured not by “servers upgraded” but by the actual share of hybrid groups in negotiation logs. A server that supports the hybrid group while its traffic never switches over is, in effect, not replaced.

Closing: the acceptance test

The acceptance criterion for key-exchange replacement is not “ML-KEM is supported” but three checkable statements: classical and post-quantum components both appear in the negotiated result (provable from captures or logs); the downgrade paths are closed, with legacy suites and classical-only groups no longer accepted; and a record-and-replay test passes — handshake traffic recorded today cannot be recovered offline without one side’s long-term private key. Only when all three hold has this segment of the replacement actually landed.

Tags: ML-KEMHybrid Key ExchangeTLSForward Secrecy