Skip to content

Post Quantum Cryptography

Exo edited this page Aug 25, 2026 · 2 revisions

Post-Quantum Cryptography

Findings from issues #1138, #1139, #1142 — assessing which parts of AutoButler's crypto stack are exposed to harvest-now-decrypt-later (HNDL) attacks, where an adversary records ciphertext today and decrypts it once a sufficiently powerful quantum computer exists.

Current posture (as assessed)

Component Algorithm PQ-safe? Action
Vault at rest AES-256-GCM Yes None
Password KDF Argon2id Yes None
WebAuthn signing (once implemented) ECDSA (default) → ML-DSA recommended No → Yes Require ML-DSA, don't accept ECDSA
TLS to Headscale TLS 1.3 + X25519 Partial Hybrid X25519 + ML-KEM when available
WireGuard key exchange (tsnet) Curve25519 Partial Track Tailscale's upstream PQ WireGuard work

WebAuthn signing — ML-DSA (#1138)

Recommendation: ML-DSA (CRYSTALS-Dilithium), NIST FIPS 204 (finalized August 2024), instead of standard ECDSA for passkey credential signing.

Findings from the spike, design filed separately as #1140:

  • Hybrid approach, not pure ML-DSA: ECDSA + ML-DSA-65, for compatibility with existing authenticators that don't support PQ signing yet.
  • Use Cloudflare CIRCL for the ML-DSA implementation until Go's standard library ships crypto/mldsa (targeted for Go 1.27).
  • COSE algorithm identifiers for ML-DSA were assigned in April 2025 — go-webauthn/webauthn needs an extension to support them, doesn't have one out of the box.
  • Platform support is uneven: Android 17 has native KeyStore support for the larger PQ keys; iOS is software-only for now (no secure-enclave-backed ML-DSA yet).
  • Key size is the practical cost: a Dilithium3 public key is 1952 bytes vs. 64 bytes for P-256 — worth confirming this doesn't cause friction in the WebAuthn ceremony on constrained devices.

TLS to Headscale — hybrid ML-KEM (#1139)

Recommendation: hybrid X25519 + ML-KEM-768 (CRYSTALS-Kyber) key exchange for TLS 1.3, per NIST FIPS 203. Hybrid means the connection stays safe as long as either algorithm holds, not just the new one.

Findings, design filed separately as #1141:

  • Go 1.24+ already enables X25519MLKEM768 by default in crypto/tls — no application code change needed to get it. AutoButler on Go 1.26.3 likely already has this active.
  • The remaining action is to verify it's actually negotiated (not just theoretically available) and add an assertion/test for it, rather than building anything new.
  • The WireGuard data plane (used by tsnet) is a separate problem — it's waiting on Tailscale to ship their own PQ WireGuard extension upstream, no timeline given. AutoButler inherits this automatically via the tsnet dependency whenever Tailscale ships it; nothing to build here.

Tracking ticket (#1142)

A third ticket covering the same ground was filed and closed as a duplicate — #1140 (ML-DSA WebAuthn) and #1141 (hybrid TLS) are the tickets actually carrying the implementation work, filed slightly earlier by Sable. Use those two for status, not this one.

Net takeaway

Of the three exposed surfaces, two need no new code (TLS is already handled by the Go version bump; WireGuard is inherited from Tailscale whenever they ship it). The one real implementation item is ML-DSA support for WebAuthn signing, which doesn't exist as a library today and needs a hybrid ECDSA+ML-DSA approach built on Cloudflare CIRCL in the interim.

Clone this wiki locally