0243. Staged signing off the critical path
- Status: Accepted (maintainer, 2026-11-15); supersedes 0200 for the default path
- Date: 2026-11-15
- Plan: M15.5; RG3.1, RG4.2
- Review: Security and authority
Context
ADR-0200 proposed from-scratch RFC 8032 Ed25519 and SHA-512, direct OS entropy, an offline root with delegated keys, and publisher plus human reviewer signatures on every release, with the maintainer's crypto review blocking publishing. In the v1 plan that work (R3a, size L, plus R3b) sat before the resolver and fetch. Hash pinning already protects locked graphs: Zig, go.sum and Nix rely on it. TUF adds expiry against freeze attacks; Go's sumdb closes trust-on-first-use; Hex signs a static registry with a key pinned by clients.
Decision
Security ships in stages, none of which blocks installing:
- v0 (Phases 0–2): HTTPS transport plus the
mandatory lock
hash. No signatures. - v1 (Phase 3, optional per registry):
snapshot.jsonwith a monotonically increasingserial, anexpirestime and the hash of every index file, signed with Ed25519 by a registry key. Clients verify only when user or project config pins that key; they cache the highest serial and reject rollback, expiry and mismatched index files. - v2 (Phase 4): checksum transparency log on the VCS host (0244).
- v3 (Phase 5): CI provenance; human-reviewer signatures as an org policy option.
Signing and verification use openssl pkeyutl
(OpenSSL 3) or an audited library chosen in Phase 3 with a
one-line crate justification. No from-scratch Ed25519 or SHA-512
on any path. Keys come from config, never from a registry or
release. Provenance fields (agent, model, reviewer) are unsigned
claims until v3.
Alternatives considered
- From-scratch Ed25519, publisher and reviewer signatures by default (0200) — a large review obligation on the critical path that blocks goals 1 and 2 without protecting locked graphs any better than hashes do.
- No signing ever — leaves first fetch from a malicious mirror and freeze attacks open.
- Full TUF roles now — more machinery than self-hosted registries need; snapshot plus expiry covers rollback and freeze.
Consequences
Phases 0–2 need no crypto review. First fetch without a pinned key trusts HTTPS and the index. Registries that pin a key need OpenSSL 3 (or the chosen library) on clients. Hosting's need for OS entropy (v1 plan H3 depended on R3b) moves to the hosting track. If accepted, 0200 is superseded for the default path; its envelope design can inform v3.