0257. Checksum log is an RFC 6962 Merkle log
- Status: Accepted (maintainer, 2026-11-16)
- Date: 2026-11-16
- Plan: M15.5; RG4.2a–RG4.2c
(
hosted registry plan) - Review: Security and authority
Context
0244
requires an append-only log of first-seen (path, version, hash)
with a signed head; 0243
signs through openssl pkeyutl and never with
from-scratch crypto. A head alone does not let a client detect a
host that shows different histories to different users.
Decision
The log is an RFC 6962 Merkle tree over sha256.rs
(leaf prefix 0x00, node prefix 0x01). A record is
<pkg> <version> sha256:<hex>\n. A
checkpoint is text: origin host, tree size, root hash, then an
Ed25519 signature by the host's log key (separate from any
registry snapshot key). The host serves the checkpoint, a lookup
with inclusion proof, and consistency proofs between sizes.
Clients that pin the host's log key verify inclusion of every
non-private package they fetch and consistency with their cached
checkpoint; offline builds never check. Private packages are never
logged.
Alternatives considered
- Hash chain with a signed head — verifying needs the whole log, and forks are only detected by comparing heads out of band.
- Go sumdb tiles now — better for public scale and caching; can be added later over the same tree.
- Log stored in a repo — mixes authority data with user history.
Consequences
The Merkle code is pure and testable with published vectors before hosting exists (RG4.2a). Clients need OpenSSL only when they pin a log key. The log is durable state that backups must include.