How we replaced Kubernetes kubeconfig tokens with post-quantum digital signatures. Built and verified on a single Arch Linux workstation. The signing key never leaves the operator machine.
Kubernetes stores credentials in a kubeconfig file. The token field
in that file is base64-encoded — a reversible encoding, not encryption. Anyone who can read
the file can run base64 -d and have a working credential. These files routinely
end up on developer laptops, in CI environment variables, in Slack messages, and in accidental
git commits. It is the dominant credential exfiltration pattern in k8s breach post-mortems.
We wanted something categorically different. Not "better password storage" — no passwords at all. The auth model we built for Skr8tr is: every mutating command is a digital signature. The private key never leaves the operator's machine. The server only knows the public key. There is nothing to steal from the server side.
ML-DSA (Module-Lattice Digital Signature Algorithm) is NIST FIPS 204, finalized in 2024. It is post-quantum secure — resistant to attacks from both classical and quantum computers. The Level 3 variant (ML-DSA-65) gives us:
We use liboqs 0.15 — the Open Quantum Safe reference implementation. One function call to sign, one to verify. The C API is clean.
The entire auth layer is two files: src/core/skrauth.h (the API contract)
and src/core/skrauth.c (the implementation). Roughly 400 lines total including
comments. Here is the core of what happens when you run
skr8tr --key ~/.skr8tr/signing.sec up app.skr8tr:
One-time setup per operator machine. The skrtrkey tool wraps
OQS_SIG_keypair:
The CLI (cli/src/main.rs) calls liboqs directly via extern "C"
FFI — no Rust oqs crate, no cmake build step, no new dependencies beyond the system liboqs.
build.rs locates the library via pkg-config or a Nix store search
and links it at compile time.
We tested this on one machine: an Arch Linux workstation (20-core, NixOS package set, liboqs 0.15 from the Nix store). Single-node cluster running locally.
This is operator-to-conductor auth only. It does not protect node-to-node mesh traffic — that runs on a trusted internal network. It does not provide multi-user RBAC — there is one operator key per cluster in the open-source version. Enterprise RBAC with per-team keys and namespace isolation is a separate layer.
The source: src/core/skrauth.c and src/tools/skrtrkey.c.
Questions or security reports: scott.bakerphx@gmail.com