Skip to main content

Module log

Module log 

Source
Expand description

Registry transparency log wire types (ACDP 0.3, RFC-ACDP-0012 — promoted from the RFC-ACDP-0009 §2.11 reservation).

The log is a per-registry, append-only RFC 6962-style Merkle tree over publish events: one accepted publish → one LogLeaf, forever. The registry commits to the tree with signed LogCheckpoints (signed tree heads) and proves membership/history with LogInclusion and LogConsistencyProof. Receipts (RFC-ACDP-0010/0011) made registry claims attributable; the log makes mint-time backdating, omission-after-the-fact, and per-consumer equivocation detectable by any auditor holding checkpoints (RFC-ACDP-0012 §3).

§Byte-level constructions

  • Leaf encoding — the JCS canonicalization (RFC 8785) of the closed leaf object; there is no exclusion set (§4). leaf_hash = SHA-256(0x00 ‖ JCS(leaf)) (§5.1).
  • Checkpoint signing — RFC-ACDP-0010 §5 verbatim (§6): JCS of the checkpoint minus signature, SHA-256, signature over the ASCII bytes of the "sha256:<hex>" string — with the registry’s receipt signing key (no new key role).
  • Merkle arithmeticacdp_crypto::merkle (RFC 6962 §2.1 with the 0x00/0x01 domain-separation prefixes; verification per RFC 9162 §2.1.3.2 / §2.1.4.2 as transcribed in §9).

All verification failures here map to AcdpError::InvalidLogProof — deliberately not InvalidReceipt: a proof failure indicts the log (tree membership, history consistency, checkpoint signature), not the receipt, and the verdicts are independent (RFC-ACDP-0012 §9.3, §11).

Structs§

LogCheckpoint
A registry-signed checkpoint (signed tree head): the registry’s commitment that, as of timestamp, the log log_id has tree_size leaves and Merkle root root_hash (RFC-ACDP-0012 §6).
LogConsistencyProof
A consistency-mode GET /log/proof response (RFC-ACDP-0012 §8.2): the RFC 6962 §2.1.2 proof PROOF(first, D[second]) that the tree at first_tree_size is a prefix of the tree at second_tree_size — the history-rewrite detector. The verifier supplies its own retained root for first_tree_size (that retained root is the whole point, §9.2).
LogInclusion
An inclusion proof that one leaf is committed by a checkpointed transparency-log tree (RFC-ACDP-0012 §8.2, §9.1): the RFC 6962 §2.1.1 audit path for leaf_index at tree_size, together with the signed checkpoint it verifies against.
LogLeaf
One transparency-log leaf: the closed object binding one accepted publish event (RFC-ACDP-0012 §4).

Constants§

LOG_CHECKPOINT_VERSION
The checkpoint envelope version (RFC-ACDP-0012 §6). In-preimage domain separator: a checkpoint can never be mistaken for — or replayed as — a context receipt or head receipt.
LOG_LEAF_VERSION
The leaf envelope version (RFC-ACDP-0012 §4). In-object domain separator (the RFC-ACDP-0011 receipt_version convention): a leaf can never be mistaken for an RFC-ACDP-0010 receipt preimage or any other JCS-canonicalized ACDP object.

Functions§

decode_sha256_hex
Decode a repository-form "sha256:<64 lowercase hex>" string to the raw 32-byte digest it encodes (RFC-ACDP-0012 §2: Merkle-internal computation operates on the raw digests the wire strings encode).
encode_sha256_hex
Encode a raw 32-byte digest in the repository-wide wire form "sha256:" + lowercase_hex(...) (RFC-ACDP-0012 §2).
parse_log_id
Split a log_id into (registry_did, instance) per RFC-ACDP-0012 §6: "<registry_did>/log/<instance>", where <registry_did> is a did:web DID and <instance> matches [a-z0-9-]{1,32}.