Hacker News new | ask | show | jobs
by dist-epoch 1 day ago
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.
1 comments

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.
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

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.
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.

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.

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?

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.

> 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?

Crypto layman here, what’s the relevance of MTU? The only thing that comes to mind for me is latency.
> he built it on a formally modeled foundation.

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

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.

> 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?

It is pretty common for math and physics majors to learn a theory by trying to re-derive the theorems. So yeah
How do you re-derive a theory like that without it being complete bs and everyone pretending theres not prior knowledge?
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.

This must be a troll. The human is still legally on the hook. Until Anthropic is legally on the hook, nothing changes.
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.
> 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.