On this page

0200. Release signing and key management

Context

M15.5 requires signed releases and agent/model/human-review provenance. Existing VC provenance is self-reported; an approval object is not a signature. Existing SHA-256 hashes content but does not authenticate its producer. The standing principle is from-scratch implementation with minimal dependencies. Transport/TLS choices remain separate from release-signature implementation.

Decision

Recommended default, not adopted: implement RFC 8032 Ed25519 from scratch in the bootstrap toolchain. New ed25519.rs and sha512.rs live under verified crates/harness/src/, alongside existing sha256.rs. No new crate or runtime OpenSSL. Use constant-time field arithmetic over 2^255-19, strict canonical-encoding verification, and no secret-dependent branches or table lookups. Reject non-canonical S and small-order points; document the precise verification equation/subgroup policy. R3a delivers verification first; R3b adds signing, keygen and trust management. Key generation reads OS entropy directly through the existing platform/natives mechanism: getrandom(2) on Linux, getentropy(3)/arc4random_buf on macOS. Handle interruptions/short reads and fail closed on entropy failure, with no weak fallback. Do not pass secret key material in argv/environment or publish it in a package.

Sign domain harness-release-v1\n plus the 32-byte release-manifest digest. Snapshot and trust signatures use distinct versioned domains. Detached envelopes bind subject, key fingerprint, role, algorithm and signature. Require both namespace-authorized publisher and independently authorized human reviewer signatures over the same release by default; reviewer identity must match signed metadata. Their keys must differ. Agent/model are signed claims, not execution attestations. Missing usage stays unknown, never fabricated zero.

Pin an offline registry root key in local operator configuration. It delegates publisher/reviewer/index roles with generations and revocations. Namespace owners propose grants; root authorization makes them trusted. Root signs rotation and recovery updates. Cache highest accepted trust/index generations to reject replay. Offline builds report their pinned trust generation; they cannot learn new revocations. No unsigned fallback and no trust-on-first-use key supplied by a release itself.

Alternatives considered

Consequences

Crypto review is a substantial new obligation: require RFC 8032 section 7.1 vectors, SHA-512 known-answer tests, and Wycheproof-style edge cases for non-canonical S, small-order points and malleability, plus malformed/canonical encoding rejection. An optional seeded randomized cross-check uses openssl pkey for key conversion and openssl pkeyutl for sign/verify only when installed; absence is an explicit test skip, never a runtime dependency or substitute for mandatory offline vectors. the maintainer's explicit human security review of arithmetic, encodings, secret-dependent control flow/accesses and key custody must be recorded before R6 publishing is enabled. Tests alone do not establish constant-time behavior; review supported optimized builds. Registry plan specifies envelopes and tests. Hosting auth separates HTTP credentials from release keys. Maintainer must approve the implementation/review scope and mandatory reviewer policy.