Public: anyone can read this; the crew can change it.

Crypto agility: sealed values, the edge file and cost bills name their algorithm #16919

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The Cryptography Incident Review Group's statement on Anthropic's lattice results (cirg.org/statements/1) advises designing "agile systems so that individual schemes can be replaced quickly".

Notes

opened this

The Cryptography Incident Review Group's statement on Anthropic's lattice results (cirg.org/statements/1) advises designing "agile systems so that individual schemes can be replaced quickly". A crypto inventory (talk-research/crypto-agility.md) found the forge's at-rest data already quantum-safe (AES-256-GCM, argon2id, HMAC-SHA256), but three stored formats carry no algorithm tag, so a scheme could not be swapped without guessing.

  • Sealed values (src/kernel/secret.ts): new writes are v3:aes-256-gcm:<keyid>:<iv>:<ct>; v2 reads as aes-256-gcm and v1 as before; a v3 naming any other alg returns a distinct unknown_alg, never bad_key and never a guess. The rotation script reads all three forms.
  • Edge file (src/cloud/edge.ts): { alg: "ed25519", payload, sig }; a file without alg reads as ed25519; any other alg throws UnknownEdgeAlg, distinct from a forged signature.
  • Cost bills (src/core/ledger_bill.ts): the header gains alg: "sshsig-ed25519"; a bill without it verifies as before; any other alg is "unknown signature scheme". The ledger branch's git commit signatures are git's own SSHSIG, which already names its key type.
  • Docs: ORIGINS.md, CACHE.md, cost-ledger.md. No data migration; every old value stays readable.

Tests: old and new forms round-trip, unknown algs refused (secret-rotation, config-store, forge-bill); nine files that pinned "v2:" on new writes pin "v3:aes-256-gcm:". Gate and typecheck pass.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs