Remix.run Logo
▲ xinayder a day ago

AFAIK WireGuard is working on a v2 that adds PQC to the protocol.

https://lists.zx2c4.com/pipermail/wireguard/2026-December/00...

▲tptacek a day ago | parent [-]

Yes, this was always the plan. The tricky thing is that the shape of key establishment with mainstream quantum-resistant algorithms is different from the one Noise wants.

This is why supersingular isogenies were briefly so interesting: they promised constructions you could just drop in to things like Noise.

▲dist-epoch a day ago | parent [-]

But if you already change the code to add a new algorithm, is it really that hard to also change the shape of the key exch? Code needs to be upgraded either way on both sides.

▲tptacek a day ago | parent [-]

No, the deployment story is the same, but the design process is more complicated, because you have to make departures from Noise. Remember, Jason didn't freelance the WireGuard key exchange; he built it on a formally modeled foundation.

▲amluto a day ago | parent | next [-]

There’s a paper called PQNoise that is more or less a KEM-based Noise adaptation, and if I put all the pieces together right, Wireguard’s use of Noise could switch to PQNoise without adding rounds.

https://eprint.iacr.org/2022/539

▲dave_universetf a day ago | parent [-]

Unfortunately pqnoise makes each handshake message exceed typical internet MTUs by a big margin. So it's not a drop-in replacement in UDP-based contexts.

▲amluto a day ago | parent [-]

An LLM calculates that pqnoise-KK using ML-KEM for some keys and Classic McEliece for the others easily fits in the standard Ethernet/Internet MTU.

There are tradeoffs, of course. The key table would be orders of magnitude larger than now, and unknown peers would need to send over a key before they could connect.

▲dave_universetf a day ago | parent [-]

Classic McEliece should not be used in any new designs. Severe weaknesses have been published, and standards orgs that used to recommend it have pulled that recommendation.

The KK handshake pattern is also not terribly useful in practice, because it's rare that you can know with no context who just connected to you in order to authenticate them. The internet runs on IK and a smattering of XX.

The limit is also not the standard ethernet/internet MTUs. The IKhfs+psk2 handshake we deployed yesterday needs just shy of 1400b MTU, which is comfortably below all common internet MTUs. Despite that, our analysis suggested that without further engineering, a few percent of our users would not be able to sustain that size of handshake over UDP.

Realistically, for a protocol that wants to be a universal drop-in replacement, the limit per packet is 1280b, ideally less to catch more of the long tail. You _can_ construct a protocol using PQC primitives and fit under that limit, but there is no obvious off the shelf choice you can reach for right now to make that happen, you're doing custom protocol and cryptographic engineering.

▲amluto 10 hours ago | parent | next [-]

The new protocol in Tailscsle is this, right?

https://github.com/noiseprotocol/noise_hfs_spec/blob/master/...

This does not obviously protect against an attacker who can break ECC before or during the exchange. I guess the blog post is kind of acknowledging that?

▲dave_universetf 9 hours ago | parent [-]

Correct. I don't think we've tried to hide the fact. The protocol we rolled out provides hybrid forward secrecy, meaning that if an attacker records traffic today and tries to break it tomorrow, they will need to break both X25519 and ML-KEM-768 to do so.

FWIW, this is the same level of security that you get from current web TLS: with properly upgraded clients and servers, your key agreement (which protects confidentiality of the session from future attackers) is a hybrid of X25519 and ML-KEM-768 (or less commonly, pure ML-KEM-768, but more web stacks deployed hybrid key agreement). But the authentication part of current web TLS still relies entirely on classical cryptography, either RSA or various elliptic curves.

Both we (tailscale) and the web PKI are actively working on also upgrading the authentication portion of our protocols, but upgrading authentication comes with a bunch of additional headaches (among others, distributing new keys securely, and dealing with the fact that post-quantum signatures are much larger than classical signatures).

But, authentication is also less urgent in a way: to break authentication, the attack you want to use has to exist and be available today, in order to break future communications. On the other hand, breaking the confidentiality of past sessions only requires that you record those sessions when they happen, and gain access to an attack at some point "soon" (where "soon" depends on the value of the data you want to access - some data is useless after an hour, other data has value a century after transmission).

This is why protocols (including TLS and tailscale) have upgraded the properties of key agreement first: it's both easier to deploy than fixing authentication, and it provides a security upgrade against a realistic attack that is feasible to start today (start recording traffic, and hope you can break it in a few years). That doesn't mean fixing authentication isn't also very important, but it's _slightly_ less pressing because attacks against authentication can only start in the future, and won't affect past traffic.

▲amluto 9 hours ago | parent [-]

Tailscale does not appear to consider the set of potentially reachable nodes and their public keys to be any sort of secret (from the perspective of other tailnet members anyway). So I imagine that something like Merkle Tree Certificates could give an inexpensive route to PQ key distribution. Even signing each Merkle root with something like SLH-DSA (which is about as conservative a choice as one could imagine) seems like very acceptable overhead in the Tailscale model. The tree could even include short term ML-KEM public keys for each online node.

I imagine one could extend this idea to optimize connection setup. Suppose that nodes, in advance of connection setup, produced a KEM messages encapsulating pairwise keys to various other nodes and produced a joint Merkle commitment to all of them. The coordinator could allow each node to download the encapsulated keys targeting it along with the inclusion proof and the commitment (~10kB using SLH-DSA for the root signature and ML-KEM for the pairwise keys and shorter if signed by a different algorithm). With this, it might even be okay to avoid any asymmetrically encrypted messages at connection setup - a session key could be derived from the pairwise key.

▲dave_universetf 8 hours ago | parent [-]

That's not the case unfortunately. If your ACLs say that two devices cannot talk each other, we explicitly guarantee that they will not learn about each others' existence in the network maps they receive.

But to a first approximation, key distribution bandwidth is not an issue. Or rather, it's an issue money can solve trivially. The bigger problems are just having to coordinate the switchover to a completely new set of protocols, and dealing with the fact that PQC cryptography imposes very different constraints on the wire than what we've become accustomed to with ECC.

It's all perfectly tractable, just a bunch of work to nail down the details.

▲vlovich123 a day ago | parent | prev | next [-]

Why not have a “knock knock” mechanism where you send the entire hello multiple times (with delays of the one-way latency)? That way you handle packet loss without the peer needing to say anything to clients that don’t know it’s there.

Then the size of the handshake doesn’t matter so much at the cost of longer connection times for UDP loss.

▲amluto a day ago | parent | prev | next [-]

> The KK handshake pattern is also not terribly useful in practice, because it's rare that you can know with no context who just connected to you in order to authenticate them.

What’s wrong with the client sending their identity in the clear as part of the connection request? Metadata leakage?

▲dave_universetf 10 hours ago | parent | next [-]

Sending the identity in the clear means transmitting their public key. Aside from leaking your identity to all passive observers, an ML-KEM-768 public key is 1184 bytes, so by sending the identity you once again massively increase the size of your messages.

pqIK has the initiator also send their ML-KEM public key, but that key is transmitted encrypted (albeit with weaker security properties than the final properties of the handshake). You pay an extra 16 bytes of overhead for the privilege, but in return you get a pretty strong privacy upgrade.

With elliptic curve cryptography, we've become used to the idea that cryptographic identities are small and cheap (256-bit ECC keys are 32 bytes). That is an anomaly, and we're not having to go back to a world where cryptographic identities are, at best, around a kilobyte. This forces a lot of changes in protocol design.

tldr: if you use pqKK and transmit the initiator's key outside the protocol, you've recreated a worse version of pqIK for almost no benefit.

▲justincormack 17 hours ago | parent | prev [-]

Yes exactly, anyone can see who it is.

▲jcims a day ago | parent | prev [-]

Crypto layman here, what’s the relevance of MTU? The only thing that comes to mind for me is latency.

▲tptacek a day ago | parent [-]

WireGuard runs over UDP. If you exceed the MTU, you'll fragment. Fragmentation is death on the Internet.

▲jcims 13 hours ago | parent [-]

Ah! I missed the UDP connection. Nice. Thank you!

▲dist-epoch a day ago | parent | prev [-]

> he built it on a formally modeled foundation.

Interesting, sounds like something today's agents can help a lot with.

▲0c3ca83 a day ago | parent [-]

Only if you don't care about understanding it. Understanding things someone else wrote is slower than writing it yourself.

And nobody wants to yolo crypto, or put their names on things they don't understand.

▲Grimburger a day ago | parent | next [-]

> Understanding things someone else wrote is slower than writing it yourself

This is a hard sell.

So everyone could have understood the Special Theory of Relativity and e=mc^2 better had they written it themselves?

▲slacknatcher12 a day ago | parent [-]

It is pretty common for math and physics majors to learn a theory by trying to re-derive the theorems. So yeah

▲Grimburger 11 hours ago | parent [-]

How do you re-derive a theory like that without it being complete bs and everyone pretending theres not prior knowledge?

▲athrowaway3z a day ago | parent | prev [-]

Crypto can and will be created & formalized by LLMs - with some experts prompting during design and testing - and they will be more secure for it.

If you're clinging into the belief that understanding is a requirement you must have been living under a rock the past month. Especially in a field like crypto where the securing and breaking are the end goals unlike with proving the RH or the thousand of other math proofs for open questions.

▲0c3ca83 a day ago | parent [-]

This must be a troll. The human is still legally on the hook. Until Anthropic is legally on the hook, nothing changes.

▲tptacek a day ago | parent | next [-]

There's no coherent resolution for this cursed subthread. Humans will still legally be on the hook. Jason is almost certainly not going to vibecode a new WireGuard version (I talk to him a bit and don't get a very agent-pilled read from him; if he was going to do that, v2 would already exist). But cryptography absolutely is going to be generated, implemented, and formally verified by AI models in the coming year. For fixed, easily-verifiable tasks like this, models already outperform humans --- not at designing new algorithms (who knows when that will happen, I sure don't) but at implementing, optimizing, and verifying pre-specified cryptography.

▲adrian_b 14 hours ago | parent [-]

I agree.

The most important impact is on verification, where the use of LLMs has already become mandatory.

For example this research that has just been reported:

https://www.minimax.io/blog/practical-cryptanalysis-with-min...

where a lot of candidates in recent cryptography competitions, and even one winner and a cipher proposed by NSA, have been broken.

▲athrowaway3z a day ago | parent | prev [-]

> The human is still legally on the hook.

What? Who? Where? How?

This must be a widespread practice for you to bring this up.

Best i've ever gotten is certificates of tests and reviews, and the disclaimer that they're specifically not on the hook.

Please tell me more about my options of the humans / companies that are willing to be legally on the hook.

▲dabinat a day ago | parent | next [-]

Perhaps not WireGuard themselves, but if you deploy this to production and customer data gets hacked, there are potential legal consequences to that, especially if you’re in Europe and subject to GDPR. It also just looks bad from a reputational point of view.

▲0c3ca83 a day ago | parent | prev [-]

Ask your agent. Or don't, understanding isn't important anymore.