<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tls on fullast.nu</title><link>https://blog.fullast.nu/tags/tls/</link><description>Recent content in Tls on fullast.nu</description><generator>Hugo</generator><language>en</language><copyright>Text and images CC BY-SA 4.0, code snippets MIT - credit blog.fullast.nu</copyright><atom:link href="https://blog.fullast.nu/tags/tls/index.xml" rel="self" type="application/rss+xml"/><item><title>I checked my homelab against the NSA's post-quantum advice, then cut my own tunnel</title><link>https://blog.fullast.nu/posts/2026-12-03-post-quantum-check-and-the-api-call-that-cut-my-tunnel/</link><pubDate>Thu, 03 Dec 2026 14:30:00 +0100</pubDate><guid>https://blog.fullast.nu/posts/2026-12-03-post-quantum-check-and-the-api-call-that-cut-my-tunnel/</guid><description>The NSA told national security systems to move to post-quantum cryptography now. I wanted to know where a small homelab stands, so I probed every SSH and TLS endpoint I own and added a pre-shared key to the WireGuard link between my two sites. The probe took ten minutes. The key took twenty minutes of outage.</description><category>post-quantum</category><category>wireguard</category><category>security</category><category>opnsense</category><category>cryptography</category><category>ssh</category><category>tls</category><category>homelab</category><category>self-hosting</category><category domain="lemmy">selfhosted@lemmy.world</category><content:encoded>&lt;p&gt;On the second of December the NSA put out a&#10;&lt;a href="https://www.nsa.gov/Press-Room/Press-Releases-Statements/Press-Release-View/Article/4662430/nsa-advises-immediate-transition-to-post-quantum-cryptography-to-protect-nation/"&gt;press release&lt;/a&gt;&#10;telling owners and vendors of national security systems to speed up their move to post-quantum cryptography. Not plan&#10;for it, speed it up. Two things in it made me sit up. One was that &amp;ldquo;frontier SI companies&amp;rdquo; had disclosed discoveries&#10;affecting some cryptography in use today, which the NSA counts as a threat on top of the quantum one, without saying&#10;what the discoveries were. The other was a sentence that has been true for years but reads differently in a press&#10;release: adversaries are already collecting encrypted traffic to decrypt later.&lt;/p&gt;&#10;&lt;p&gt;The release points to a seven-page advisory published the day before,&#10;&lt;a href="https://media.defense.gov/2026/Dec/01/2004039413/-1/-1/0/CSA_Immediate_Actions_Push_Toward_PQC.PDF"&gt;Immediate Actions to Push Toward Post-Quantum&lt;/a&gt;.&#10;It is more practical than I expected. Six steps, ordered by how much they reach for the effort: inventory where&#10;cryptography is used, move TLS to 1.3 with post-quantum settings on, stand up post-quantum certificate authorities,&#10;reissue certificates and re-sign software, update firmware to whatever the vendor already ships, and isolate and&#10;watch whatever can&amp;rsquo;t be upgraded. The target is NSA&amp;rsquo;s CNSA 2.0 suite, which means ML-KEM-1024 for key exchange and&#10;ML-DSA-87 for signatures, both standardised by NIST in 2024 (&lt;a href="https://csrc.nist.gov/pubs/fips/203/final"&gt;FIPS 203&lt;/a&gt;&#10;and &lt;a href="https://csrc.nist.gov/pubs/fips/204/final"&gt;FIPS 204&lt;/a&gt;). For hybrid key exchange in TLS it points to&#10;&lt;a href="https://datatracker.ietf.org/doc/rfc10024/"&gt;RFC 10024&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The discoveries weren&amp;rsquo;t secret, as it turned out, just not the NSA&amp;rsquo;s to describe. Two days before the release, a&#10;group of cryptographers calling itself the Cryptography Incident Review Group had published an&#10;&lt;a href="https://cirg.org/statements/1/"&gt;initial assessment&lt;/a&gt; of what Anthropic had sent them: a quantum attack on the&#10;structured lattices that ML-KEM and ML-DSA are built on. Against those standards as they stand, the attack costs far&#10;more than the ones already known, and those were already out of reach; the group&amp;rsquo;s word for its scale is&#10;&amp;ldquo;galactic&amp;rdquo;. What worries them is the direction, and they expect the attack to get better. Their advice reads like a&#10;plan for the rest of this post: keep migrating, choose the highest security level you can, combine schemes built on&#10;different mathematics, and make it possible to swap one out quickly. Fast Company&amp;rsquo;s&#10;&lt;a href="https://www.fastcompany.com/91650570/chaotic-rollout-anthropic-cryptographic-breakthrough"&gt;account of how the findings reached the cryptographers&lt;/a&gt;&#10;is messier, and ends with Peter Schwabe, one of the people behind the designs that became ML-KEM and ML-DSA, putting&#10;it plainly: &amp;ldquo;That software was insecure before. It&amp;rsquo;s not like it suddenly became insecure.&amp;rdquo;&lt;/p&gt;&#10;&lt;p&gt;My homelab is not a national security system. It is two sites, a few Proxmox boxes, a pair of OPNsense firewalls&#10;and some NAS units that are older than I like to admit. But step one applies to anyone, and I had no idea where I&#10;stood, so that evening I went and looked.&lt;/p&gt;&#10;&lt;p class="logo-strip" aria-label="Software in this post"&gt;&#10; &lt;span class="logo-strip-item"&gt;&lt;span class="logo" role="img" aria-label="WireGuard" title="WireGuard" style="background-image:url('/images/icons/wireguard.svg')"&gt;&lt;/span&gt;WireGuard&lt;/span&gt;&#10; &lt;span class="logo-strip-item"&gt;&lt;span class="logo" role="img" aria-label="OPNsense" title="OPNsense" style="background-image:url('/images/icons/opnsense.svg')"&gt;&lt;/span&gt;OPNsense&lt;/span&gt;&#10; &lt;span class="logo-strip-item"&gt;&lt;span class="logo" role="img" aria-label="Proxmox" title="Proxmox" style="background-image:url('/images/icons/proxmox.svg')"&gt;&lt;/span&gt;Proxmox&lt;/span&gt;&#10; &lt;span class="logo-strip-item"&gt;&lt;span class="logo" role="img" aria-label="Tailscale" title="Tailscale" style="background-image:url('/images/icons/tailscale.svg')"&gt;&lt;/span&gt;Tailscale&lt;/span&gt;&#10;&lt;/p&gt;&#10;&#10;&lt;h2 id="asking-every-server-what-it-offers"&gt;Asking every server what it offers&lt;/h2&gt;&#10;&lt;p&gt;For SSH I didn&amp;rsquo;t want to log in anywhere. Logging in to thirty-odd hosts means thirty-odd auth log lines, and on the&#10;firewalls a failed attempt gives sshguard points I&amp;rsquo;d rather not collect. SSH is kind here. Right after the version&#10;banners, before any authentication, the server sends a packet called KEXINIT that lists every key exchange it is&#10;willing to do. So the probe connects, sends a banner, reads that one packet and hangs up:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;banner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostkeys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ssh_kexinit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# reads the server&amp;#39;s KEXINIT, then closes&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pq&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;kex&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;mlkem768x25519-sha256&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;sntrup761x25519-sha512@openssh.com&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For TLS I used plain &lt;code&gt;openssl s_client&lt;/code&gt;, once offering only the hybrid group &lt;code&gt;X25519MLKEM768&lt;/code&gt; and once with&#10;defaults to see what the server picks on its own.&lt;/p&gt;&#10;&lt;p&gt;The first TLS run lied to me. All three of my iLO cards came back as post-quantum, over TLS 1.2, which is not a thing.&#10;What had happened is that I offered only the ML-KEM group, the iLO ignored it, fell back to an RSA key exchange and&#10;the handshake succeeded. My check counted &amp;ldquo;handshake succeeded&amp;rdquo; as a pass. It now looks at the negotiated group&#10;instead, and the iLOs dropped to where they belong.&lt;/p&gt;&#10;&lt;p&gt;&lt;img alt="A WireGuard handshake: a fresh Curve25519 exchange and a pre-shared key both go into the session keys. Traffic recorded today and attacked later is only exposed if no pre-shared key was used" loading="lazy" src="https://blog.fullast.nu/images/wireguard-psk-handshake.svg"&gt;&lt;/p&gt;&#10;&lt;p&gt;The result was better than I expected. Everything on a current Debian, which here means the Proxmox hosts and every&#10;container, already offers the ML-KEM hybrid for SSH because&#10;&lt;a href="https://www.openssh.com/pq.html"&gt;OpenSSH 10 made it the default&lt;/a&gt;. Two Ubuntu machines&#10;offer the older sntrup761 hybrid, which is also fine. The public websites, the Proxmox GUIs and all three firewall&#10;GUIs negotiate &lt;code&gt;X25519MLKEM768&lt;/code&gt; without being asked. I did nothing to earn any of that; it came with updates.&lt;/p&gt;&#10;&lt;p&gt;By the advisory&amp;rsquo;s own yardstick none of it would pass, mind you. Its list of things to flag includes EdDSA and any&#10;elliptic curve other than P-384 or P-521, which covers my Ed25519 SSH keys and the X25519 half of every hybrid above,&#10;and CNSA 2.0 wants ML-KEM-1024 where OpenSSH and the browsers use 768. The cryptographers&amp;rsquo; &amp;ldquo;highest level you can&amp;rdquo;&#10;points the same way, and 768 is the default I get rather than one I chose. For a homelab I&amp;rsquo;m fine with that. The&#10;hybrids are there so that breaking one half alone gets you nothing, which is the part I care about.&lt;/p&gt;&#10;&lt;p&gt;The gaps were the appliances. The NAS units run OpenSSH 8.2, and one of them 7.4, and none of their web&#10;interfaces offer the hybrid. The iLOs are TLS 1.2. The Windows box that runs Plex has OpenSSH 9.5 without a hybrid. None of&#10;these are reachable from outside, and none of them are mine to fix beyond pressing &amp;ldquo;update&amp;rdquo; when the vendor ships&#10;something. The advisory&amp;rsquo;s last step is written for exactly this pile: list what can&amp;rsquo;t be upgraded, keep it isolated,&#10;and watch it. That part I was already doing, mostly by accident. For the &amp;ldquo;pressing update&amp;rdquo; part there is a decent&#10;companion piece from the Australian, US and NSA agencies,&#10;&lt;a href="https://www.cyber.gov.au/publication/post-quantum-questions-to-ask-your-vendors"&gt;Post-quantum questions to ask your vendors&lt;/a&gt;.&#10;It&amp;rsquo;s written for procurement teams, but the questions about hardcoded crypto and firmware signing are the ones I&amp;rsquo;d&#10;ask about a NAS if anyone at the vendor were listening.&lt;/p&gt;&#10;&lt;p&gt;Then there was WireGuard. WireGuard&amp;rsquo;s key exchange is Curve25519 and nothing else, and every peer in both firewalls&#10;had the pre-shared key field empty, including the site-to-site link that carries backups, metrics, syslog and every&#10;admin session between the homelab and the apartment.&lt;/p&gt;&#10;&lt;h2 id="why-a-pre-shared-key-is-the-cheap-fix"&gt;Why a pre-shared key is the cheap fix&lt;/h2&gt;&#10;&lt;p&gt;WireGuard has an &lt;a href="https://www.wireguard.com/protocol/"&gt;optional pre-shared key&lt;/a&gt; per peer pair, put there by its&#10;author for exactly this case: the original design judged post-quantum public-key schemes impractical for the&#10;handshake and left a symmetric key as the escape hatch. When it is set, it gets mixed into the handshake along with&#10;the Curve25519 result, so the session keys depend on both. Someone who records the tunnel today and gets a quantum&#10;computer, or a clever attack, in ten years can recover the Curve25519 part and still has nothing, because the PSK&#10;never crossed the wire. It costs no throughput I can measure and nothing changes for the machines behind the tunnel.&lt;/p&gt;&#10;&lt;p&gt;The WireGuard author said as much on the mailing list the same day the NSA release came out, in a post titled&#10;&lt;a href="https://lists.zx2c4.com/pipermail/wireguard/2026-December/009817.html"&gt;Post Quantum WireGuard, WireGuard v2, ongoing AI discoveries, and so forth&lt;/a&gt;:&#10;if you can share a 256-bit key by some secure means, breaking the tunnel comes down to breaking that key, not any&#10;public-key maths. He also said work on a WireGuard v2 has started, and was frank that it won&amp;rsquo;t be easy to do elegantly&#10;with today&amp;rsquo;s post-quantum primitives. Not every WireGuard user even has the PSK option. Tailscale, for one,&#10;&lt;a href="https://tailscale.com/kb/1460/post-quantum-cryptography"&gt;doesn&amp;rsquo;t use PSKs and doesn&amp;rsquo;t let you set them&lt;/a&gt;.&#10;It is also, by accident, the kind of diversity the cryptographers asked for. The key doesn&amp;rsquo;t rest on curves or&#10;lattices at all, only on a symmetric cipher and on nobody else having it.&lt;/p&gt;&#10;&lt;p&gt;It isn&amp;rsquo;t magic. The PSK is a static shared secret, so if it ever leaks together with a recording and a broken curve,&#10;the protection is gone. Mine lives in the firewall configs and their backups and nowhere else. I never printed it. I did have to think about&#10;how it got to the far end, because &amp;ldquo;securely&amp;rdquo; is doing a lot of work in that advice. The apartment firewall received&#10;it over its own API, through the very tunnel it was about to protect. What saves that is the layer inside: the API is&#10;HTTPS, and with stock OpenSSL 3.5 on my side that firewall&amp;rsquo;s GUI negotiates the ML-KEM hybrid, so the key crossed&#10;the old tunnel inside a post-quantum session. Next time I&amp;rsquo;d rather not depend on reasoning like that.&lt;/p&gt;&#10;&lt;h2 id="twenty-minutes-without-a-tunnel"&gt;Twenty minutes without a tunnel&lt;/h2&gt;&#10;&lt;p&gt;The plan was careful, or I thought so. The apartment side first, because the only way I reach the apartment firewall&#10;is through this tunnel, and I&amp;rsquo;d lose the path the moment the two ends disagreed. Then both homelab firewalls over the&#10;LAN a few seconds later, because WireGuard is one of the things my firewall pair does not sync between nodes. A&#10;Proxmox snapshot of the apartment firewall VM before any of it, and the VM watchdog paused so it wouldn&amp;rsquo;t &amp;ldquo;help&amp;rdquo;. The&#10;key itself written to a file readable only by me until a handshake proved it worked.&lt;/p&gt;&#10;&lt;p&gt;The dry run read every peer on all three firewalls and was happy. I ran it for real at 23:34.&lt;/p&gt;&#10;&lt;p&gt;The apartment call never answered. I half expected that, since the apartment applied the change and the tunnel my&#10;request was riding on went down. I pushed the key to the two homelab nodes, and then nothing happened for four&#10;minutes. No handshake. When I dumped the peer from the homelab firewall, the key was there and the field that ties&#10;the peer to its WireGuard instance was empty.&lt;/p&gt;&#10;&lt;p&gt;This is the call I had made, on all three firewalls:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/api/wireguard/client/setClient/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;client&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;psk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;psk&lt;/span&gt;&lt;span class="p"&gt;}})&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On OPNsense the link between a peer and an instance is stored on the instance, and &lt;code&gt;setClient&lt;/code&gt; rewrites it from&#10;whatever you send in &lt;code&gt;servers&lt;/code&gt;. Send nothing and the peer gets detached from every instance it was on. It&amp;rsquo;s a partial&#10;update that isn&amp;rsquo;t partial. My dry run couldn&amp;rsquo;t have caught it, because it only read.&lt;/p&gt;&#10;&lt;p&gt;The homelab side I could fix from where I sat. The apartment side was now unreachable from anywhere I had a shell, so&#10;it needed a person in front of a browser on the apartment network. That person was me. My saved login was then&#10;rejected, which cost a few more minutes before I remembered that I&amp;rsquo;d put TOTP on that GUI in October and the code goes&#10;straight after the password. Re-ticking the instance on the peer, Save, Apply, and the handshake came back with the&#10;new key at about five to midnight.&lt;/p&gt;&#10;&lt;p&gt;The fix in the script is two lines. It reads the peer&amp;rsquo;s current instances and sends them along with the key, and it&#10;refuses to touch a peer that is on no instance at all:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;servers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;selected&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;get_client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;servers&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;/api/wireguard/client/setClient/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;client&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;psk&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;psk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;servers&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;servers&lt;/span&gt;&lt;span class="p"&gt;}})&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The bigger lesson is the order I&amp;rsquo;d been so pleased with. Doing the far side first protected me from cutting the path&#10;while the change was in flight. It did nothing about a change that was wrong. For anything that can sever the only&#10;road to a box, I now try the same write on something harmless first, a disabled throwaway peer would have done.&lt;/p&gt;&#10;&lt;h2 id="whats-left"&gt;What&amp;rsquo;s left&lt;/h2&gt;&#10;&lt;p&gt;The site link is done and both firewall nodes have the key, so a failover keeps it. My phone and the laptops still&#10;connect without a PSK. Adding one means changing the firewall and the device profile together while I hold the&#10;device, and after this evening I&amp;rsquo;m in no hurry to do that at midnight. The oldest NAS needs a look at whether its vendor&#10;still ships updates for it, and the rest of the appliances will become post-quantum when their vendors decide they should.&#10;I&amp;rsquo;m not sure yet whether I&amp;rsquo;ll ever get the iLOs there.&lt;/p&gt;&#10;&lt;p&gt;I also looked at &lt;a href="https://rosenpass.eu/"&gt;Rosenpass&lt;/a&gt;, which does the second thing the WireGuard author describes: it&#10;runs a post-quantum key exchange next to WireGuard and swaps a fresh PSK in every couple of minutes. It&amp;rsquo;s maintained&#10;and there&amp;rsquo;s a FreeBSD port, but my tunnel ends on OPNsense, where there&amp;rsquo;s no plugin for it, and NetBird, the one&#10;packaged integration I found, has marked its Rosenpass support as deprecated. A static key I rotate by hand will do&#10;until WireGuard v2 shows up.&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;ll rerun the probe now and then. It takes a minute and it no longer lies about TLS 1.2.&lt;/p&gt;&#10;</content:encoded></item></channel></rss>