2026-12-03 / dig

iroh, the NSA and PQC

What the recent lattice research and NSA advisory mean for iroh, and our plan for post-quantum TLS and identities

We've been watching the world of cryptography change rapidly over the past few days.

As stewards of a technology that promises encrypted and authenticated connections, you have put your trust in us to see through the chaos and deliver technology that is ergonomic, fast, and secure.

Starting with the good news: the paper from Anthropic everyone was initially worried about, does not worsen the security of existing deployed classical or post-quantum (PQ) algorithms in practice. The attack it describes needs a quantum computer and is far too expensive to run against the standardized parameters.

The statement from the NSA advising the accelerated move to PQ algorithms is also quite measured, and not (yet) any indication that the (cryptographic) sky is falling. As Ryan Hurst writes moving and changing cryptographic systems takes a long time, so having this clear guidance will hopefully help everyone accelerate this slow process, so that we all have more secure systems in the near future.

Today iroh uses X25519 as its preferred key exchange in TLS, and its identity solution is based on Ed25519, both of which rely on Curve25519 under the hood. So far no attack on these has been published and the joint announcement from the ONCD, NSA and CISA states that the advances "do not present an immediate and widespread threat".

The inclusion of EdDSA and curves below P-384 in the advisory ("algorithms not approved in CNSA 2.0 or CNSA 1.0") is not new and has been NSA policy since 2016. Filippo Valsorda's reading of this as a warning for 256-bit curves specifically is his interpretation, and might or might not be right.

This means there is no known practical attack on iroh's security today.

But let’s be clear, iroh needs a plan for a possible future where Curve25519 is broken. We have been thinking about this for a while, but changing our encryption and identity schemes is not just costly in performance and in engineering time, but also costs something for you to upgrade. It's time, though, so we are going to work at a measured pace and with deliberate focus to bring a fully post-quantum secure iroh to you all.

Luckily we are not alone here, and one of our forerunners, WireGuard, has begun investigating a v2 for the same reasons.

What is that going to look like?

There are two critical parts that we have to upgrade in iroh, the TLS encryption, and the identity using EndpointIds.

Rolling out PQ TLS encryption by default is the first one we are working on. This is the part that is most at risk, as here "harvest now, decrypt later" attacks can be applied right now, and changing algorithms later can not protect old traffic retroactively.

The identity, which relies on signatures, has no impact on past connections, as a break here only allows active impersonation of endpoints in the system.

How the wire is encrypted - TLS 1.3 Key Exchanges

For this part we've already implemented post-quantum support. The next step is to start enabling X25519MLKEM768 as the default and preferred key exchange in TLS for both relays and direct connections. This configuration will be fully backwards compatible to begin with, as older clients will use the currently deployed default. For those wanting to enforce the new key exchange, it will be possible to do so when configuring an Endpoint.

Our choice here follows RFC 10024 and runs a hybrid exchange of X25519 and ML-KEM-768, which relies on at least one of them to be secure. This means in all cases this is at least as secure as what iroh offers today.

Right now the public relays that n0 runs are still default configured for the classical X25519, but of course we will upgrade these as we start rolling these changes out. The relay connections themselves are not as critical, as all traffic is still encrypted from endpoint to endpoint using your choice of algorithm.

This has real costs in the handshake, but we believe they are now worth the cost. Current measurements put the growth of initial packets in the 1KiB range. This means that the ClientHello no longer fits into a single QUIC packet. Initial simulations on a network path with 100ms round trip time show the handshake time increases from 107ms to around 134ms. Luckily there are no additional roundtrips needed.

We plan on rolling this out in the coming weeks, but of course we will keep you posted about the development on this blog.

Who am I talking to - Ed25519 Signatures

The next part, upgrading iroh's identity, is more complex and we are still evaluating the best approach. There are quite a few tradeoffs here to consider, as we want to keep the ergonomic 32-byte identities, but need to deal with the hard reality that PQ public keys are considerably larger. In addition, we want to make sure we design this in a way so that upgrades in the future are secure, but practical to roll out. If upgrading is too difficult, then no one is going to do it, and we all lose.

How and if EndpointIds will change, and how they will be backwards compatible, is not decided yet. We also don't know which algorithm, or combination of algorithms, we will settle on.

As we develop concrete proposals and ideas we will post about them on this blog.

What you can do today

If you want to upgrade your deployment today, you can already opt in to using the X25519MLKEM768 key exchange, as we posted earlier. If you do so, please let us know about any bugs or issues you encounter, so we can fix them asap. We know of a bug that affects graceful connection closure in some cases when using hybrid cryptography handshakes.

References

← Back to all articlesJoin the conversation ↗