Merkle Tree Inclusion Proofs

Verify one leaf using a logarithmic path of sibling hashes and preserve the distinction between leaves and internal nodes.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. An ordered parent binds both children
  2. A proof is relative to a trusted version of the root

An ordered parent binds both children

Hash a leaf using a leaf-specific encoding. For an internal node, hash a separate node tag followed by the left and right child hashes. The root commits to the organized tree under the hash assumptions. In a four-leaf tree, proving inclusion of the third leaf needs the fourth leaf’s hash and the parent hash of the first two. Combine the third hash with the fourth, then place that result to the right of the first pair’s parent.

A proof is relative to a trusted version of the root

Repeat the specified child ordering and compare the final result with an authenticated root for the intended tree size and version. Domain separation prevents a leaf encoding from being confused with an internal node encoding. An inclusion proof alone does not show that a later root is an append-only extension. Hash collision resistance underlies the binding argument. Immutable log verification explains why consistency between roots is a separate check.[1][2]

References

  1. IETF, RFC 9162: Certificate Transparency Version 2.0 ↩
  2. Dan Boneh and Victor Shoup, A Graduate Course in Applied Cryptography ↩