rfc9162
Crate docs. The module documentation includes a tested example that hashes alpha, beta and gamma and checks the inclusion proof for beta.
| Item | Role |
|---|---|
leaf_hash | SHA-256(0x00 || entry) |
node_hash | SHA-256(0x01 || left || right) |
root | Merkle root of a leaf slice, including the empty slice |
inclusion_proof | sibling hashes, innermost first, or None when the index is outside the slice |
verify_inclusion | folds a path back to a hexadecimal root |
consistency_proof | nodes that recompute an old root and a new root, or None when old is 0 or past the slice |
verify_consistency | checks that pair of roots |
Head | size and hexadecimal root; over builds one; material is the tab-separated signing input |
hex / from_hex | lowercase hexadecimal for a 32-byte hash; from_hex accepts 64 digits in 0-9 and a-f |
The tree how-to runs these functions. The Merkle tree, inclusion and consistency pages describe the results.