An IPsec VPN joins networks via an encrypted tunnel. Here's how it works, what a quantum computer breaks in it, and how ML-KEM gets into IKEv2.
An IPsec VPN is an encrypted tunnel built at the IP layer, either between two networks (site-to-site) or between a single device and a network (remote access). The two ends authenticate each other and agree keys using the Internet Key Exchange protocol, IKEv2, and then every packet that crosses the tunnel is encrypted and integrity-checked by the Encapsulating Security Payload (ESP). Most organisations use IPsec to connect their offices, data centres and cloud networks, often over the public internet.
The part a quantum computer would threaten is the key exchange inside IKEv2. Anyone recording a tunnel today could, with a large enough quantum computer, recover its keys later and read everything it carried. We think site-to-site tunnels are among the most attractive harvest targets in a typical estate. They go through a small number of known gateways, they carry whole networks’ worth of traffic, and they tend to stay up, largely unchanged, for years.
How an IPsec VPN works
IPsec is a family of protocols rather than a single product. The architecture is set out in RFC 4301 (December 2005). In a modern deployment two protocols do the work.
IKEv2 (RFC 7296) does the negotiation. In the first exchange, IKE_SA_INIT, the peers agree on algorithms and run a Diffie-Hellman key exchange. Every key IKEv2 later uses comes from a value called SKEYSEED, which is derived from that Diffie-Hellman result and the two peers’ nonces. In the second exchange, IKE_AUTH, each side proves who it is (usually with an X.509 certificate) and the first Child SA is set up for user traffic.
ESP then carries the data. Packets are encrypted and authenticated using symmetric keys derived from the IKE session, normally AES in GCM mode. In tunnel mode, the usual choice for gateways, the whole original packet is wrapped inside a new one, so an observer on the internet sees only the two gateway addresses.
Keys don’t last forever. The NCSC’s recommended lifetimes are one day for the IKE SA and eight hours for each Child SA. Rekeying with a fresh Diffie-Hellman exchange gives forward secrecy against today’s attackers. It doesn’t help against a quantum computer, which could solve each recorded exchange one at a time.
IPsec VPN or SSL/TLS VPN?
The other common type of VPN uses TLS. An SSL/TLS VPN usually runs through a browser or a lightweight client over port 443 and is popular for remote access to specific applications. IPsec works below the application, so it can carry any IP traffic, and it’s the norm for permanent links between sites and into cloud providers. Both have the same quantum problem in their key exchange. We look at the TLS side in our article on elliptic curve cryptography and the quantum threat; this article stays with IPsec.
One version question is settled. IKEv1 was formally deprecated by the IETF in RFC 9395 (April 2023) and moved to Historic status. The NCSC strongly advises that it should no longer be used and wants any government systems still running it to be on a time-bounded plan to move to IKEv2. If your inventory turns up IKEv1 tunnels, fix those before anything quantum-related.
What the NCSC recommends today
The NCSC’s guidance “Using IPsec to protect data” (version 2.1, reviewed 10 December 2025) defines a Recommended Profile for protecting OFFICIAL information:
IKEv2, with AES-128-GCM for encryption and HMAC-SHA-256 as the pseudo-random function
Diffie-Hellman group 19 (256-bit elliptic curve) or group 14 (2048-bit MODP)
X.509 certificates using ECDSA P-256 or RSA-2048 with SHA-256
AES-128-GCM for ESP
The NCSC expects that profile to give suitable protection for OFFICIAL information until at least 31 December 2027. It strongly prefers certificates to pre-shared keys. Where PSKs can’t be avoided, it asks for at least 128 bits of entropy, a separate key for each group of devices, and careful handling of the keys from creation to destruction.
On quantum, the guidance is brief. It says a cryptographically relevant quantum computer threatens the cryptography securing IPsec, that the main mitigation is migration to post-quantum cryptography, and that the NCSC will add IPsec PQC profiles once implementations of the final standards are widespread. So there’s no UK post-quantum IPsec profile yet. That isn’t a reason to wait. The inventory and supplier work take longer than a configuration change.
Which parts of an IPsec VPN a quantum computer breaks
Shor’s algorithm breaks the maths behind Diffie-Hellman, elliptic curves and RSA. Mapped onto an IPsec tunnel:
The IKE key exchange, whether group 19 or group 14, is broken. Someone who recorded IKE_SA_INIT and the traffic that followed could compute SKEYSEED, then every Child SA key, then the plaintext.
Certificate authentication with ECDSA or RSA is broken too, but only from the day a quantum computer exists. A forged signature would let an attacker impersonate a gateway. It doesn’t expose traffic recorded in the past.
ESP encryption with AES survives. NIST IR 8547 says symmetric algorithms with at least 128 bits of classical security, AES-128 included, are believed to meet its lowest post-quantum security category.
There’s a common misunderstanding about pre-shared keys. In IKEv1, a strong PSK was fed into key derivation, and RFC 8784 notes that IKEv1 used with strong preshared keys is not vulnerable to quantum attacks for that reason. IKEv2 changed the model. Its PSK only authenticates the peers; the session keys come from Diffie-Hellman alone. A long PSK on an IKEv2 tunnel won’t protect recorded traffic.
On symmetric key length, the sources don’t quite agree. The NCSC profile uses AES-128 and NIST treats it as adequate. RFC 8784 is stricter: for deployments that rely on its post-quantum preshared keys, it lists any ESP transform with a key shorter than 256 bits among the options that should not be used. CNSA 2.0, which covers US National Security Systems, specifies AES-256. For new tunnels we’d just go with AES-256-GCM, so the symmetric layer never has to be revisited.
Why IPsec traffic is worth harvesting
NIST IR 8547 says NIST expects to prioritise quantum-resistant key establishment to protect against harvest now, decrypt later attacks, “particularly in interactive protocols like TLS and Internet Key Exchange (IKE)”. IKE is named outright.
It’s because of what flows through these tunnels. A site-to-site VPN between a bank’s data centres carries payment and customer data. A link between a defence contractor and its supplier carries design files that stay sensitive for decades. Public-sector links carry health, tax and benefits records. If that data has to stay confidential past the mid-2030s, the harvest now, decrypt later clock is already running for anything recorded this year.
How post-quantum key exchange gets into IKEv2
The obvious move would be to drop a post-quantum algorithm into IKE_SA_INIT. Size makes that awkward. Under FIPS 203, an ML-KEM-768 public key is 1,184 bytes and its ciphertext is 1,088 bytes. IKEv2’s own fragmentation (RFC 7383) only works on encrypted messages, and IKE_SA_INIT isn’t encrypted, so large key shares there risk IP fragmentation, which firewalls and NAT devices often drop.
The IETF’s answer comes in two parts:
RFC 9242 (May 2022) adds an IKE_INTERMEDIATE exchange between IKE_SA_INIT and IKE_AUTH.
RFC 9370 (May 2023) lets a negotiation include up to seven additional key exchanges, each of which is mixed into the keys.
In practice the classical exchange (say group 19) runs first in IKE_SA_INIT. Its keys encrypt the following IKE_INTERMEDIATE exchange, which can then be fragmented and carries the ML-KEM key share. New keys are derived after each exchange, so the tunnel stays secure as long as either algorithm holds.
The ML-KEM specifics are in draft-ietf-ipsecme-ikev2-mlkem. Version 09 defines identifiers 35, 36 and 37 for ML-KEM-512, ML-KEM-768 and ML-KEM-1024, and it’s aimed at Proposed Standard. When we checked the IETF Datatracker on 13 November 2026, the IESG had approved it and it was waiting in the RFC Editor queue. The draft advises against putting ML-KEM-768 or ML-KEM-1024 in IKE_SA_INIT over UDP on networks where the path MTU is unknown or restricted, which is why the hybrid design above exists.
The draft deals with downgrade too. An active attacker can mess with the first exchange, which isn’t protected, and the simplest defence it gives is to switch off traditional-only negotiation. Our advice is the same: once both peers support the hybrid exchange, make ML-KEM mandatory in policy rather than just offering it.
You can already get implementations. The open-source strongSwan project added RFC 9370 multiple key exchanges and ML-KEM in version 6.0.0, released on 3 December 2024. Commercial firewalls and cloud VPN gateways vary by product and firmware version, so ask each vendor for specifics and test them yourself. Don’t assume.
For tunnels that can’t run ML-KEM yet there’s an interim option. RFC 8784 (June 2020) mixes a post-quantum preshared key into IKEv2 key derivation. The RFC calls for at least 256 bits of entropy and warns that a key derived from a password or other low-entropy source is not secure. It protects the Child SA keys and later rekeyed IKE SAs, but the first IKE SA, including peer identities and traffic selectors, stays exposed unless you rekey before sending anything sensitive. Distributing those keys to many gateways is the hard part, so it suits a handful of high-value links better than a whole estate.
Authentication is the slower half
Post-quantum signatures in IKEv2 are further behind in deployment. A separate draft, draft-ietf-ipsecme-ikev2-pqc-auth, describes how ML-DSA and SLH-DSA can authenticate IKEv2 peers. It was also in the RFC Editor queue on 13 November 2026. Using it means gateway certificates issued by a CA that can sign with those algorithms, so the PKI behind your VPNs has to move as well.
This is less urgent, since a forged signature doesn’t expose recorded traffic. You still need a plan for it, though. The NCSC’s current certificate parameters are only stated to be suitable until at least the end of 2027, and its migration timeline asks organisations to finish their highest-priority migrations by 2031 and everything by 2035. Gateway PKIs are often private, which gives you more control over timing than you’d have with public web certificates.
An IPsec VPN checklist for the quantum transition
Get a list of every tunnel. For each one you want the gateway make, model and firmware, the IKE version, the Diffie-Hellman group, how it authenticates and who’s at the other end. Don’t forget cloud VPN gateways or links your suppliers run.
Retire IKEv1 wherever it’s still running.
Flag any tunnel carrying data that needs to stay confidential past 2035. Those go first.
Ask every vendor to tell you in writing whether they support RFC 9242, RFC 9370 and ML-KEM in IKEv2, and from which firmware.
If they do, try a hybrid setup on a pilot: group 19 in IKE_SA_INIT plus ML-KEM-768 in IKE_INTERMEDIATE (or ML-KEM-1024 if you’re under CNSA 2.0). Switch on IKEv2 fragmentation and test over the path the traffic really takes, NAT and firewalls and all.
If they don’t, think about RFC 8784 preshared keys for the handful of links you care most about.
As you reconfigure each tunnel, move ESP and IKE encryption over to AES-256-GCM.
Start planning ML-DSA gateway certificates, and begin with the private CAs you control.
If you’re dealing with US National Security Systems, CNSA 2.0 requires its quantum-resistant algorithms in new acquisitions from 1 January 2027, and those include ML-KEM-1024 and AES-256. Our regulatory clock tracks those dates alongside the NCSC and EU timelines.
Most teams get stuck on steps 1 and 3. The VPN configuration is scattered across devices, clouds and suppliers. Our quantum security report shows how findings become a prioritised remediation plan, and the QuantSec platform page explains how we find quantum-vulnerable cryptography in code and systems. For the board-level view, see how CISOs prepare for quantum computing threats.
Sources
NCSC: Using IPsec to protect data (version 2.1, reviewed 10 December 2025)
RFC 9370: Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2)
RFC 8784: Mixing Preshared Keys in IKEv2 for Post-quantum Security
IETF draft-ietf-ipsecme-ikev2-mlkem: Post-quantum Key Exchange with ML-KEM in IKEv2
IETF draft-ietf-ipsecme-ikev2-pqc-auth: Signature Authentication in IKEv2 using PQC
NIST FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard
NIST IR 8547: Transition to Post-Quantum Cryptography Standards
Find out what a quantum computer could break in your estate
QuantSec scans your on-chain and off-chain systems for cryptography a quantum computer could break, then delivers a digitally signed report with a prioritised migration plan. When you are ready to act, our team can carry out the post-quantum migration with you.
Follow QuantSec on LinkedIn for research and quantum security updates.





