At a glance
Two principles hold in every row:
- Hybrid, not replacement. Where a post-quantum algorithm is added, the classical one stays beside it and both must hold. ML-KEM and ML-DSA are young; a flaw found in either one does not weaken ChatCLI below what it had before.
- Transparent migration. Data, keys, signatures and trails created by earlier versions keep working. Nothing is rewritten in a way that could strand it, and nothing asks you to convert it by hand.
Data on disk
Everything ChatCLI seals under~/.chatcli uses AES-256-GCM. Each file and each journal line is sealed under its own key, derived with HKDF-SHA512 from the data secret and a random 32-byte salt stored with the payload. A passphrase in CHATCLI_ENCRYPTION_KEY shorter than 32 characters is stretched with Argon2id and PBKDF2-HMAC-SHA512 together.
Stored data uses no public-key cryptography, so there is no key exchange to replace here: its exposure to a quantum computer is the key size and the hash, and both are at the top of the suite.
Stores written by earlier versions still open and are rewritten in the new format on their own. Your recovery key did not change. See Encryption at Rest for the migration and the downgrade path.
TLS
Every TLS connection ChatCLI makes or accepts negotiates a hybrid key exchange, a classical curve combined with ML-KEM, whenever the other side supports one. That covers the client and server (chatcli connect, chatcli server), the Kubernetes operator, the health probe, and outbound calls to LLM providers, webhooks and SMTP.
CHATCLI_TLS_PQ decides what happens when the other side does not support one:
The variable is read by the CLI, the server and the operator. In Kubernetes it is
security.tlsPostQuantum in both Helm charts and spec.server.security.tlsPostQuantum on an Instance.
Rolling out a strict mode
Rolling out a strict mode
One end is enough. A server on
cnsa and a client on the default negotiate ML-KEM-1024, and so does the reverse, because ChatCLI clients and the operator already offer every group. Set the mode on the server first, confirm, then set it on the clients that should refuse a server without it.A strict mode applies to whatever terminates TLS. An ingress, a mesh sidecar or a load balancer in front of the server must support the groups the mode demands, or connections through it are refused.A strict mode has no plaintext
A strict mode has no plaintext
A strict mode demands a post-quantum key exchange, and a plaintext connection has none. Under any mode other than
prefer:- the server refuses to start without a certificate;
- the operator refuses to start unless its REST API has TLS (
security.apiTLS.*); - a client refuses
CHATCLI_ALLOW_INSECURE=true; - the health probe refuses to run without the server certificate.
Checking what was negotiated
Checking what was negotiated
/config security shows the mode in effect in the current session.An invalid value
An invalid value
A value that does not parse is an error at server and operator startup. In the CLI it is reported on screen and the strictest mode applies, so a typo never weakens a session.
Certificates are still signed with classical algorithms: public certificate authorities and the TLS ecosystem do not issue post-quantum certificates yet. A classical certificate protects against impersonation today, which a future quantum computer cannot undo after the fact. The hybrid key exchange is what protects recorded traffic against being decrypted later. The TLS 1.3 record cipher is chosen by the Go TLS stack and cannot be pinned.
Releases
chatcli update authenticates a release with a hybrid signature: Ed25519 and ML-DSA-87 over the same statement, both required. The statement names what is signed, its purpose and the key pair, so a signature cannot be replayed for something else and one half cannot be combined with another key.
The updater verifies the hybrid signature against the key pair embedded in the binary, then the SHA-512 of the download. It refuses a release with only one valid half, with the earlier format alone, or without the new assets. An older binary updates once through the Ed25519 assets and verifies every update after that with the hybrid signature. See Auto-update.
Container images are signed with Cosign and Homebrew verifies SHA-256: those are the mechanisms of their ecosystems and are unchanged.
Plugins
Plugin signing keys are hybrid as well, for tool plugins and provider plugins alike.- A hybrid key accepts only a signature with both halves. Removing the ML-DSA-87 half or presenting the earlier format does not verify.
- A signature file still begins with the Ed25519 signature, so a plugin signed today installs on ChatCLI versions from before the change.
- A classical key fingerprint reads
SHA256:…; a hybrid one readsSHA512:….chatcli plugin verifyandchatcli plugin trust listsay which kind a plugin or key is. - When a publisher upgrades, an installation that pinned the earlier fingerprint accepts the hybrid successor without asking, because the key it already trusts signed for the pair. The pin moves to the hybrid fingerprint and does not go back.
- Keys and signatures from before the change keep working.
Server tokens (JWT)
The key material you configure decides which algorithms the server accepts, never the token:
RS256 is the part a quantum computer breaks. Identity providers do not issue ML-DSA-87 tokens yet, so ChatCLI can issue them itself:
chatcli jwt sign --secret-env CHATCLI_JWT_SECRET --subject alice issues one. See Server Mode.
Integrity hashes
Where ChatCLI picks a hash to protect integrity, it is SHA-512:- Audit trail. Each entry is chained to the previous one with SHA-512. Entries written with SHA-256 by earlier versions keep verifying, and a trail moves over at the first entry a current version appends.
/config security verify-auditreports how many entries use each hash. - Workspace trust.
chatcli trustrecords a SHA-512 fingerprint of the files that can run code or change the security posture. A workspace trusted earlier stays trusted while those files are unchanged. - Webhooks. The gateway webhook sends
X-ChatCLI-Signature-512besideX-ChatCLI-Signature, and the operator webhook channel sendsX-Signature-512besideX-Signature-256. The SHA-256 headers are unchanged for receivers that check them. See Webhook.
What is still classical, and why
Hardening checklist
For a deployment that must refuse anything classical between its own components:-
CHATCLI_TLS_PQ=cnsaon the server (security.tlsPostQuantum: cnsain the chart,spec.server.security.tlsPostQuantum: cnsaon an Instance), with TLS enabled. - The same on the operator, with TLS on its REST API.
- Whatever terminates TLS in front of them supports
SecP384r1MLKEM1024. -
chatcli healthcheck -show-tlsreportsSecP384r1MLKEM1024 (post-quantum hybrid). - JWT verification configured with ML-DSA-87 public keys only, or a shared secret with issuers on HS512.
- Plugin publishers moved to hybrid keys (
chatcli plugin trust listshows no key that is Ed25519 alone). -
/config security verify-auditreports every entry in SHA-512 for new trails.