{"slug": "post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to", "title": "Post-quantum WireGuard today: the pre-shared key option Jason Donenfeld points to, step by step", "summary": "WireGuard author Jason A. Donenfeld told the WireGuard mailing list on December 2, 2026 that the project is investigating a v2 protocol with no dates set, and pointed to two post-quantum options available now: WireGuard's optional 256-bit pre-shared key, or a post-quantum key exchange such as Rosenpass run inside the tunnel and fed into the same PSK slot, which refreshes the key every two minutes. Donenfeld said keeping WireGuard's simplicity with today's post-quantum primitives is hard because elliptic curves were an ergonomic sweet spot, and called both current options good solutions as things stand. Setting a PSK takes one command per peer via wg genpsk, which prints 32 random bytes as a 44-character base64 string, and wg show wg0 preshared-keys prints (none) for any peer without one.", "body_md": "# Post-quantum WireGuard today: the pre-shared key option Jason Donenfeld points to, step by step\n\nWireGuard's author says a v2 protocol is in the works and points to two options that work now: a 256-bit pre-shared key, or a post-quantum key exchange run inside the tunnel and fed into the same slot. This page shows how to set up both and how to check they are live.\n\n**This explains reporting by**\n\n[Jason A. Donenfeld on the WireGuard mailing list: Post Quantum WireGuard, WireGuard v2, ongoing AI discoveries, and so forth (Dec. 2, 2026)](https://lists.zx2c4.com/pipermail/wireguard/2026-December/009817.html).\nRead the original first:\n\n[https://lists.zx2c4.com/pipermail/wireguard/2026-December/009817.html](https://lists.zx2c4.com/pipermail/wireguard/2026-December/009817.html)\n\n## In one minute\n\n- On December 2 Donenfeld told the WireGuard list the project is working on a v2 protocol, with no dates.\n- For now he points to WireGuard's optional 256-bit pre-shared key (PSK). If it is shared offline, breaking the tunnel means breaking a 256-bit ChaCha20 key, not the elliptic-curve exchange.\n- If you cannot share a key offline, run a post-quantum key exchange inside the tunnel and put the result in the PSK slot. Rosenpass does that and refreshes the key every two minutes.\n- Setting a PSK is one command per peer, and both ends must hold the same key.\n- wg show prints (none) for any peer without a PSK, so checking is one line.\n\n## What Donenfeld said\n\nThe post responds to the recent claims that AI-driven math advances might weaken today's cryptography, and links the NSA's December 2 advisory. It says the project is aware and is charting a path forward.\n\nHe describes a WireGuard v2 as being investigated, built on WireGuard's versioned crypto design: when a primitive breaks, the version number goes up and new software ships. He is frank that keeping WireGuard's simplicity with today's post-quantum primitives is hard, because elliptic curves were an ergonomic sweet spot.\n\nUntil then he names two options that work today, and calls both good solutions as things stand.\n\n## What the pre-shared key slot does\n\nWireGuard's handshake is built on Curve25519. The optional PSK is a 32-byte symmetric key that is mixed into that handshake. The wg(8) man page describes it as an extra layer of symmetric-key cryptography mixed into the public-key cryptography, for post-quantum resistance.\n\nThe effect: an attacker who could solve the elliptic-curve part, now or later from recorded traffic, still needs the PSK to derive the session keys. Without it, the recording stays sealed.\n\nThe catch is the word pre-shared. If you send the PSK over a channel that itself relies on elliptic curves or RSA, a future break of that channel exposes the PSK too. Donenfeld's condition is a secure offline means.\n\n## Option one: set a pre-shared key\n\nGenerate one key per peer pair. wg genpsk prints 32 random bytes in base64, 44 characters long. Our test Mac had no wg binary, so we checked the length with an equivalent: openssl rand -base64 32 also prints 44 characters.\n\n```\nwg genpsk > peer-a-b.psk\nchmod 600 peer-a-b.psk\nsudo wg set wg0 peer <peer public key> preshared-key ./peer-a-b.psk\n```\n\nThe man page says the key must be passed as a file, because command-line arguments are not private on most systems. To make it stick across restarts, add it to the peer's section of the config on both ends:\n\n```\n[Peer]\nPublicKey = <peer public key>\nPresharedKey = <the 44-character key from peer-a-b.psk>\nAllowedIPs = 10.0.0.2/32\n```\n\nThen confirm. Any peer still without a PSK shows (none):\n\n```\nsudo wg show wg0 preshared-keys\n```\n\nIf the two ends hold different keys, the handshake fails and the tunnel stays down, which is the safe failure. latest-handshakes in wg show tells you quickly.\n\n## Moving the key and rotating it\n\nUse a different PSK for each peer pair. One shared PSK across a whole fleet means one leak opens every tunnel's recordings.\n\nOffline means not over today's public-key crypto: in person, on removable media you control, or through your device-provisioning step before the device leaves your hands.\n\nPlan rotation like any secret. A PSK that never changes is only as safe as every copy ever made of it.\n\n## Option two: a post-quantum exchange feeding the slot\n\nWhen keys cannot be shared offline, Donenfeld suggests running one or more post-quantum key exchanges through an established WireGuard tunnel and putting the result in the PSK slot. He says some VPN providers already do this.\n\nRosenpass is an open-source tool built for exactly that. Its README says it establishes a symmetric key with post-quantum cryptography via liboqs, hands it to WireGuard through the PSK feature, and refreshes it every two minutes. Because it only fills the PSK slot, it says the pair is no less secure than WireGuard alone.\n\nIts README is also clear about the trade-offs of its rp front end: it runs as root, needs both the WireGuard and Rosenpass private keys, takes control of the interface and works with one interface. It points to a stand-alone mode in a container, jail or VM for a tighter setup. It also uses two UDP ports, N for Rosenpass and N+1 for WireGuard, so update firewall rules.\n\n## What this does not fix\n\nA PSK protects the secrecy of the tunnel. It does nothing for the machines at either end, the software that holds the key, or a commercial VPN app whose config you cannot edit.\n\nIt also does not tell you whether Curve25519 is actually weakened. The email does not claim that, and neither do we.\n\n## Who is affected\n\n| Case | Status | \n|---|---|\n| Self-managed WireGuard tunnels | Can add a PSK today with one command per peer. | \n| Recorded WireGuard traffic without a PSK | Relies only on Curve25519; exposed if that is broken later. | \n| Commercial VPN apps built on WireGuard | Depends on the provider. Donenfeld says some already feed a PQ exchange into the PSK slot. | \n| WireGuard v2 | Being investigated; no dates. | \n\n## What to do\n\n- Run wg show <interface> preshared-keys on every WireGuard host and list the peers showing (none).\n- Generate one PSK per peer pair with wg genpsk and set it on both ends.\n- Move keys offline, or through provisioning, not over a public-key channel.\n- Where offline sharing is impossible, test Rosenpass in stand-alone mode.\n- Ask your VPN provider in writing whether it fills the PSK slot with a post-quantum exchange.\n\n## What is still unknown\n\n- No WireGuard v2 design or dates are public.\n- We did not run wg or Rosenpass for this page; commands come from the wg(8) man page and the Rosenpass README.\n- Which VPN providers already fill the PSK slot with a post-quantum exchange is not named in the email.\n- Whether any AI-driven result affects Curve25519 is not established by anything we read.\n\n## Sources\n\n- [Jason A. Donenfeld on the WireGuard mailing list: Post Quantum WireGuard, WireGuard v2, ongoing AI discoveries, and so forth (Dec. 2, 2026)](https://lists.zx2c4.com/pipermail/wireguard/2026-December/009817.html) — the original report\n- [wg(8) man page, wireguard-tools](https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8)\n- [Rosenpass README (GitHub)](https://github.com/rosenpass/rosenpass)\n- [Hacker News discussion of the email (906 points)](https://news.ycombinator.com/item?id=50736464)\n\n[AI News Report](https://theainewsreport.com/)· every headline, every morning.", "url": "https://wpnews.pro/news/post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to", "canonical_source": "https://theainewsreport.com/2026-12-03-wireguard-preshared-key-post-quantum-today.html", "published_at": "2026-12-03 14:52:07+00:00", "updated_at": "2026-12-03 15:47:15.219568+00:00", "lang": "en", "topics": ["ai-safety"], "entities": ["Jason A. Donenfeld", "WireGuard", "Rosenpass", "NSA", "Curve25519", "ChaCha20"], "also_reported_by": [], "takeaway": "Mix a 32-byte pre-shared key generated with wg genpsk into each WireGuard peer pair's handshake so recorded traffic stays sealed even if Curve25519 is broken, and verify with wg show wg0 preshared-keys, which prints (none) for peers lacking one.", "recommendation": {"advice": "Set a unique 256-bit PSK per WireGuard peer pair shared offline, or run Rosenpass inside the tunnel to refresh it every two minutes, then confirm with wg show wg0 preshared-keys.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to", "markdown": "https://wpnews.pro/news/post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to.md", "text": "https://wpnews.pro/news/post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to.txt", "jsonld": "https://wpnews.pro/news/post-quantum-wireguard-today-the-pre-shared-key-option-jason-donenfeld-points-to.jsonld"}}