FIG. 03 · Live
Merkle Proof Verifier
Merkle trees let anyone prove that a record belongs to a log using a handful of hashes instead of the whole log. Hashes here are real SHA-256 values computed by your browser’s Web Crypto API.
Leaves
FIG. 03.1Merkle tree
FIG. 03.2Select a leaf to see its proof path. Select any hash to copy the full 64-character value.
- Proof path
- Sibling hash
- Verified root
- Changed since seal
- Unchanged
Tamper lab
FIG. 03.3Seal the current root, then edit any leaf. Every hash that changes turns crimson all the way to the root; untouched subtrees stay green.
No baseline sealed yet.
Inclusion proof
FIG. 03.4Select a leaf in the tree to generate its proof.
Independent verifier
FIG. 03.5The verifier only sees this JSON: the leaf, its index, the claimed root and the sibling hashes. It rebuilds the root from scratch and never looks at the tree above.
Reconstruction
- Computed root
- Claimed root
How it works
Methodology
- Leaves are UTF-8 strings. Each level pairs nodes left to right and hashes each pair; with the promote rule a lone last node moves up unchanged, which reproduces the RFC 6962 tree shape exactly.
- An inclusion proof is the list of sibling hashes from the leaf to the root, each tagged with the side it sits on. For N leaves it holds at most ⌈log₂ N⌉ hashes.
- The verifier checks two things: that the hashes rebuild the claimed root, and that the sibling sides agree with the leaf index and tree size, so a proof cannot be replayed for a different position.
- Unit tests compare every root against an independent RFC 6962 implementation for 1 to 16 leaves and check that modified leaves, swapped siblings and wrong roots are rejected.