CEFV · Module 2 of 5 · 14 min
Merkle trees and inclusion proofs (RFC 6962)
A Merkle tree hashes records in pairs up to one root. RFC 6962 (Certificate Transparency) prefixes leaf hashes with 0x00 and interior nodes with 0x01, preventing a leaf from being confused with an interior node.
An inclusion proof is the list of sibling hashes from a leaf to the root: about log2(n) hashes prove one record is in a tree of n records.
Verify by recomputing up the path and comparing to the pinned root.
Key points
- Leaves: 0x00 prefix; nodes: 0x01.
- Inclusion proof ≈ log2(n) sibling hashes.
- Recompute to the pinned root.
In the CAIN-42 codebase
cain/worm_export.py— Merkle binding of evidence
Practice check
Practice 1 · choose one
Why does RFC 6962 use different leaf/node prefixes?
Practice 2 · true or false