Skip to main contentSkip to footer
VPN Banner
HomeNews & EventsThe cost of a quantum-safe VPN

The cost of a quantum-safe VPN

For years, the VPN tunnel has drawn the line between the internet and the corporate network. Whatever goes through the tunnel counts as internal, even though it crosses the internet. That’s why so many companies still run internal websites and file shares without encryption of their own, since the tunnel already encrypts the traffic.

Harvest-now-decrypt-later breaks that assumption. From the outside, a VPN tunnel is just a stream of encrypted packets, and anyone on the path can record it today. Once a cryptographically relevant quantum computer breaks the tunnel’s key exchange, everything inside becomes readable, including every internal protocol that relied on the tunnel for its secrecy. One key exchange protects all the traffic between two networks, which makes the VPN a prime target for anyone who records now and decrypts later.

 

In this third protocol deep dive, we look at WireGuard, which has become the modern default, and measure what it takes to make it quantum-safe.

Where the quantum risk sits in WireGuard

WireGuard is built for simplicity. Each peer has a static X25519 key pair, and peers exchange their public keys out of band. The handshake is two messages, one round trip, and uses static and ephemeral X25519 keys to derive the session keys and authenticate both ends. Traffic is then encrypted with ChaCha20-Poly1305, which is already quantum-safe. As in TLS and SSH, the key exchange is what a quantum computer breaks, and here it also takes authentication down with it.

Unlike TLS and SSH, WireGuard isn’t crypto-agile, and that’s on purpose. No algorithm negotiation, one fixed set of primitives. That keeps the WireGuard handshake small, but nobody can add ML-KEM to it without changing the protocol itself. Post-quantum WireGuard has to go through the one door its designers left open, an optional pre-shared key:

WireGuard peer with a pre-shared key

WireGuard peer with a pre-shared key

That 32-byte symmetric key is mixed into every handshake, and is explicitly presented as protection against future quantum attacks in WireGuard’s whitepaper. An attacker who breaks X25519 still doesn’t get the session keys without it, and if the pre-shared key leaks, the connection is as safe as plain WireGuard. Same hybrid principle as in TLS and SSH.

 

The catch is that a static key typed into a config file has to be distributed and rotated by hand, and it never changes on its own. The quantum-safe way is to derive a fresh one regularly, with a post-quantum key exchange running next to WireGuard.

Rosenpass, a post-quantum key exchange next to WireGuard

Rosenpass does exactly that. It runs its own post-quantum handshake between the two peers over a separate UDP port, then hands the resulting key to WireGuard as its pre-shared key. WireGuard itself doesn’t change. It simply uses that key in its next handshakes.

Rosenpass combines two post-quantum key encapsulation mechanisms. Each peer has a static Classic McEliece key, and every handshake adds one ML-KEM exchange with a fresh, ephemeral key. McEliece and ML-KEM both feed into the final shared key.

 

Rosenpass uses McEliece for the static keys because its ciphertexts are small, 188 bytes against 768 for ML-KEM. Its public keys are huge, about 512 KB, but like WireGuard keys they’re exchanged once, out of band, and never cross the network during a handshake.

 

In September 2026, though, Germany’s BSI advised against Classic McEliece for new developments, after recent attacks that aren’t practical yet. Since Rosenpass also runs ML-KEM, recorded exchanges stay protected. Only authentication would be affected.

 

Other products follow the same McEliece + ML-KEM pattern: Mullvad VPN uses it to derive its WireGuard pre-shared key, and NetBird integrates Rosenpass directly.

What it costs

We measured WireGuard handshakes between two peers, over the same network path, first with plain WireGuard, then with Rosenpass 0.2.3 providing the pre-shared key.

Compared to our previous articles, there are only two working configurations this time. Either both peers run plain WireGuard, or both run WireGuard with Rosenpass. Rosenpass is a protocol of its own, so both ends need to switch together.

WireGuard handshake size, classical vs post-quantum

WireGuard handshake size, classical vs post-quantum

Rosenpass increases the handshake size by 2.6 KB, from 324 B to 3.0 KB. WireGuard’s own handshake stays at 324 B, so all the overhead comes from Rosenpass, mostly from ML-KEM.

WireGuard handshake time, classical vs post-quantum

WireGuard handshake time, classical vs post-quantum

Rosenpass needs two round trips, which adds 49 ms on a good network and 70 ms on degraded Wi-Fi. WireGuard’s own handshake is untouched. On Wi-Fi, it just takes longer because the network is slower.

 

In our lab, the two handshakes run one after the other. In practice, they don’t have to, as WireGuard knows nothing about Rosenpass and simply uses the latest key it received at its next handshake.

Always on, even when idle

The real difference shows up over time. WireGuard renews its session keys every two minutes, but only while traffic flows, so an idle tunnel stays silent. Rosenpass renews the pre-shared key every two minutes, whether you use the tunnel or not.

On a tunnel in use, that’s nothing. Applied to an afternoon of work on our own WireGuard VPN, Rosenpass would have added 0.13% to the traffic, against 0.02% for WireGuard’s own handshakes.

Handshake share of a WireGuard session with Rosenpass

Handshake share of a WireGuard session with Rosenpass

Other VPN protocols

WireGuard isn’t the only VPN moving to post-quantum cryptography. OpenVPN and IPsec are crypto-agile, so they can take the same path as TLS.

OpenVPN runs its key exchange inside a TLS handshake, so making it quantum-safe means making TLS quantum-safe. On OpenSSL 3.5 or later, it can negotiate the same hybrid X25519MLKEM768 key exchange as browsers. The cost is the one we measured in our TLS post: a few kilobytes per handshake and no noticeable delay.

 

Authentication is another story. OpenVPN usually authenticates both server and client with X.509 certificates, and moving them to ML-DSA makes every certificate and signature several times larger.

 

IPsec also follows the hybrid approach for the key exchange. Peers can run additional key exchanges after the classical one, and the IETF is standardizing ML-KEM as the post-quantum one. For authentication, IPsec uses either certificates, with the same ML-DSA size question as OpenVPN, or pre-shared keys, which leaves it to the administrator to exchange them securely.

Both halves at once

In TLS and SSH, the key exchange and authentication migrate separately, on two timelines. Rosenpass does both in one step. Its exchange protects the session keys against harvest-now-decrypt-later, and since only peers holding the right static keys can complete it, it also authenticates them with post-quantum keys, McEliece for now. WireGuard stays untouched. The only cost is the Rosenpass handshake itself, 2.6 KB every two minutes, while neither the WireGuard handshake nor the traffic in the tunnel gets any slower.

Its main drawback is that it never rests. Rosenpass renews the key every two minutes, even on an idle tunnel. A lazy mode, renewing only while traffic flows the way WireGuard does, would remove most of that cost. We don’t know if the Rosenpass team plans one, and it would come with a trade-off. When traffic resumes, WireGuard would either wait for a fresh key, adding Rosenpass’s round trips to the first packets, or start on an older one.

The tunnel is no longer the perimeter

Much of what organizations treat as “local” network traffic runs through VPN tunnels over the public internet, where it can be harvested today. Under harvest-now-decrypt-later, being inside the VPN no longer makes traffic internal. It makes it one key exchange away from being readable.

Plan to migrate your VPNs to post-quantum cryptography now, and protect the services inside them on their own too. It starts with a cryptographic inventory: which tunnels still run a classical key exchange, and which internal services rely on them for their secrecy.

Related Content

SOS