Last validated: View as Markdown
Post-quantum cryptography (PQC) is cryptography designed to resist attacks from adversaries with access to quantum computers. A large enough quantum computer could break the asymmetric cryptography that most protocols use today, such as elliptic-curve and RSA key exchange and signatures. Symmetric cryptography, such as the ciphers that encrypt traffic after a connection is established, is much less affected. A 256-bit symmetric key is still considered secure.
Standards for post-quantum asymmetric cryptography are now available. An example is Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM), which the National Institute of Standards and Technology (NIST) standardized for key exchange. Major web browsers and service providers already use ML-KEM in their Transport Layer Security (TLS) implementations.
- Key exchange: Two parties use key exchange to agree on a symmetric key that encrypts the rest of the connection. An adversary can record encrypted traffic today and store it until they can break the key exchange that protected it. This is called a "harvest now, decrypt later" (HNDL) attack. Traffic recorded today can be decrypted once a large enough quantum computer exists, so key exchange needs post-quantum protection before then, especially for data that must stay confidential for years.
- Signatures and authentication: Signatures prove who created a message or key. An adversary who can break a signature algorithm can forge new signatures and impersonate a peer in new connections, but can't use that ability to decrypt traffic recorded in the past. Signatures carry less immediate risk, because they only need to be replaced before an adversary can break them.
A hybrid key exchange combines a classical algorithm, such as X25519, with a post-quantum algorithm, such as ML-KEM. Both algorithms contribute to the final key, so the key stays secure as long as either algorithm remains unbroken.
Major web browsers use this approach to add post-quantum protection to TLS.
During the handshake between two connecting devices, WireGuard uses asymmetric cryptography to derive symmetric session keys. The rest of the session is encrypted with those keys, and WireGuard runs a new handshake to replace them about every two minutes. An adversary who records handshakes and later breaks the asymmetric cryptography can recover the session keys from each handshake and decrypt the traffic sent under them.
WireGuard intentionally avoids cipher and protocol agility, as described in WireGuard: Next Generation Kernel Network Tunnel. Both sides use a fixed set of algorithms, and the protocol has no algorithm negotiation. Changing an algorithm requires updating every endpoint to a new version of the protocol.
WireGuard has an optional pre-shared key (PSK) feature. Both peers mix the same symmetric key, configured ahead of time, into the asymmetric handshake. Because a 256-bit symmetric key is not considered practically breakable by quantum computers, the PSK keeps the session keys, and the traffic they encrypt, secret even if an adversary later breaks the asymmetric cryptography. Each pair of peers needs its own PSK, and the PSKs must be distributed outside WireGuard through a channel that is itself post-quantum secure. Otherwise, an adversary could record the PSKs too.
Tailscale builds on WireGuard by adding automatic mesh configuration, single sign-on (SSO), NAT traversal, TCP transport, and centralized access control policies. For an overview of the cryptography Tailscale uses, refer to Tailscale encryption.
- Device-to-device traffic: Starting with Tailscale v1.106, two devices that both run v1.106 or later automatically use a hybrid handshake. Because Tailscale ships the client on both ends of the connection, it can extend the handshake in its own WireGuard implementation, even though the WireGuard protocol has no algorithm negotiation. The handshake adds an ephemeral ML-KEM-768 key exchange to WireGuard's X25519 key exchange, and both contribute to the session keys. This protects traffic between those devices against HNDL attacks. If either device doesn't support the hybrid handshake, for example because it runs an earlier version, the two devices use the standard WireGuard handshake, which is not post-quantum secure. Refer to the Post-quantum key exchange in Tailscale v1.106 blog post for more information.
- Control plane: The connection between devices and the coordination server uses a Noise-based protocol with classical X25519 key exchange. Tailscale is working on adding post-quantum key exchange to this connection.
- Signatures: Features that rely on signatures, such as Tailnet Lock, which signs node keys with Ed25519, don't use post-quantum signatures yet.
- HTTPS certificates: Certificates from
tailscale certare issued by Let's Encrypt for an Elliptic Curve Digital Signature Algorithm (ECDSA) P-256 key that the device generates. These certificates are not post-quantum.
To get post-quantum protection for traffic between your devices, update every device in your tailnet to Tailscale v1.106 or later. You don't need to change any configuration.
Does Tailscale use or support WireGuard's PSK option?
No. Tailscale doesn't set a WireGuard PSK, and you can't configure one. Instead, the hybrid key exchange in v1.106 protects recorded traffic against quantum attacks, without any extra keys to distribute or manage.
Does shorter key expiry or more frequent node key rotation protect against HNDL attacks?
No. WireGuard already creates new ephemeral keys for every session. A quantum adversary who recorded a handshake can recover the session keys from that handshake alone, so rotating node keys or shortening key expiry doesn't help. Only adding a post-quantum secret to the handshake, as the v1.106 hybrid handshake does, protects recorded traffic.