3 min read

Why the NSA’s Post-Quantum Advisory Took One Environment Variable to Fix

When the NSA urged an immediate move off 256-bit ECC, clean ingress architecture did 90% of the work—leaving one Cloudflare Tunnel env var to flip.
Minimalist isometric architectural illustration of an encrypted tunnel conduit passing through a post-quantum crystal lattice

On December 2, 2026, the NSA issued an official advisory calling for an immediate transition to post-quantum cryptography—mandating accelerated migration for National Security Systems and urging operators and vendors to move now before legacy cryptography can be exploited. As Filippo Valsorda broke down in his analysis, reading between the lines makes the signal clear:

  • 256-bit elliptic curves (P-256, X25519/Ed25519) are likely weakened or broken by a classical attack—probably still expensive and narrow today, which is why it isn’t a drop-everything emergency, though attacks only get cheaper.
  • ML-KEM and ML-DSA remain unaffected and are the real destination.
  • RSA-3072 and P-384 are acceptable interim stopgaps for authentication and PKI where ML-DSA isn’t available yet.
  • Symmetric cryptography (AES, ChaCha20, SHA-256) is untouched.

Whenever a cryptographic advisory like this drops, most infrastructure teams brace for a painful week: hunting down forgotten reverse proxies, stale OpenSSL builds, pinned cipher suites, and dozens of self-managed TLS endpoints.

When I audited my own self-hosted stack, it took one environment variable.


Why Architecture Did 90% of the Work

Crypto-agility is rarely something you bolt on during an incident; it is a side effect of keeping your trust boundaries boring and centralized.

Because my self-hosted infrastructure follows a zero-open-ports model—no exposed router ports, no sprawling fleet of public-facing TLS terminators, and internal services kept strictly on private HTTP behind centralized gateways—the audit across every transport layer looked like this:

Boundary Transport Layer Post-Quantum Status Action Required
Public Edge (Browser ↔ Edge) Cloudflare Edge TLS 1.3 Already negotiates hybrid X25519MLKEM768 None
Private Mesh (Node ↔ Node) Tailscale Current release negotiates hybrid ML-KEM-768 (Noise_IKhfs) None
Admin Shell (SSH KEX) OpenSSH 10+ Already defaults to mlkem768x25519-sha256 with no legacy pins None
Internal App Tier Isolated HTTP behind gateways No public TLS termination sprawl to reconfigure None
Origin ↔ Edge Tunnel cloudflared --post-quantum defaults to false Enable PQ mode

That table is the entire argument for consolidating ingress. Instead of patching TLS stacks across twenty-something containers, the only gap in confidentiality (the urgent "harvest now, decrypt later" threat) was a single hop: the tunnel leg between my host and Cloudflare’s edge.


The One Fix: Turning On Post-Quantum Mode in cloudflared

Even on a current cloudflared release, post-quantum tunnel negotiation (--post-quantum, controlled by TUNNEL_POST_QUANTUM) still defaults to false. That meant browser-to-Cloudflare traffic was hybrid post-quantum while the origin-to-edge QUIC tunnel remained classical.

Rather than editing the vendor systemd unit directly—which breaks on the next package upgrade—I added a minimal systemd drop-in at /etc/systemd/system/cloudflared.service.d/post-quantum.conf:

[Service]
Environment="TUNNEL_POST_QUANTUM=true"

Reloading systemd and restarting cloudflared brought all four high-availability QUIC tunnel connections back online immediately, with the daemon explicitly logging X25519MLKEM768 in its tunnel curve preferences and end-to-end HTTPS checks returning cleanly without a single change to any application container.


What Remains on the Radar (Without the Panic)

Filippo’s post draws a sharp distinction between key exchange (confidentiality) and authentication (signatures/PKI):

  • Key exchange is the urgent piece because recorded traffic can be decrypted retroactively once an attack gets cheaper. With Cloudflare Edge, cloudflared, Tailscale, and OpenSSH 10+ all negotiating ML-KEM hybrids, that surface is covered.
  • Authentication—specifically rotating SSH host and user keys off Ed25519—requires an active attacker in real time. Once OpenSSH 10.6 (which standardizes hybrid ssh-mldsa44-ed25519 keys) lands across client and server packages, migrating is a straightforward key rotation—and where immediate interim hardening is needed, RSA-3072 or P-384 fills the gap cleanly.
  • Patching still wins on risk: As Filippo dryly noted, everyday Remote Code Execution bugs remain a far larger real-world threat than frontier cryptanalysis. Automated OS and container vulnerability patching still does more to protect a real system than chasing exotic crypto headlines.

The Takeaway: Boring Boundaries Scale

The whole audit, config change, and independent end-to-end verification took one short agentic session—orchestrated with strict scope boundaries and fresh post-change verification gates rather than hand-waving "it should work."

If a major cryptographic advisory forces you to edit fifteen nginx configs and recompile half your stack, the problem wasn’t the advisory—it was the surface area. Keep your ports closed, keep your ingress centralized, stay on current runtimes, and the next cryptographic transition becomes a one-line drop-in.


Note on authorship: As with every article on blog.marzeta.pl, the audit, configuration change, and verification were directed by me and executed with autonomous AI agents under strict verification gates.