zebra_chain::orchard::tree

Function merkle_crh_orchard

source
fn merkle_crh_orchard(layer: u8, left: Base, right: Base) -> Base
Expand description

MerkleCRH^Orchard Hash Function

Used to hash incremental Merkle tree hash values for Orchard.

MerkleCRH^Orchard: {0..MerkleDepth^Orchard − 1} × P𝑥 × P𝑥 → P𝑥

MerkleCRH^Orchard(layer, left, right) := 0 if hash == ⊥; hash otherwise

where hash = SinsemillaHash(“z.cash:Orchard-MerkleCRH”, l || left || right), l = I2LEBSP_10(MerkleDepth^Orchard − 1 − layer), and left, right, and the output are the x-coordinates of Pallas affine points.

https://zips.z.cash/protocol/protocol.pdf#orchardmerklecrh https://zips.z.cash/protocol/protocol.pdf#constants