Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::aztec::AztecMerkleHashPolicyT< Separator > Struct Template Reference

Aztec-specific hash policy for Merkle trees, parameterised by a tree-specific domain separator for internal-node hashing. More...

#include <aztec_hash_policy.hpp>

Inheritance diagram for bb::aztec::AztecMerkleHashPolicyT< Separator >:
bb::crypto::merkle_tree::Poseidon2HashPolicy

Static Public Member Functions

static bb::fr hash_pair (const bb::fr &lhs, const bb::fr &rhs)
 
- Static Public Member Functions inherited from bb::crypto::merkle_tree::Poseidon2HashPolicy
static fr hash (const std::vector< fr > &inputs)
 
static fr hash_pair (const fr &lhs, const fr &rhs)
 
static fr hash_pair_with_separator (uint64_t sep, const fr &lhs, const fr &rhs)
 
static fr zero_hash ()
 

Detailed Description

template<uint64_t Separator>
struct bb::aztec::AztecMerkleHashPolicyT< Separator >

Aztec-specific hash policy for Merkle trees, parameterised by a tree-specific domain separator for internal-node hashing.

Append-only trees (note-hash, L1->L2 message, archive) instantiate this template with DOM_SEP__MERKLE_HASH. Indexed trees instantiate it with a tree-specific constant (DOM_SEP__NULLIFIER_MERKLE, DOM_SEP__PUBLIC_DATA_MERKLE, DOM_SEP__WRITTEN_SLOTS_MERKLE, DOM_SEP__RETRIEVED_BYTECODES_MERKLE), so that sibling paths cannot be transported across trees even if two leaves happen to collide.

Definition at line 19 of file aztec_hash_policy.hpp.

Member Function Documentation

◆ hash_pair()

template<uint64_t Separator>
static bb::fr bb::aztec::AztecMerkleHashPolicyT< Separator >::hash_pair ( const bb::fr lhs,
const bb::fr rhs 
)
inlinestatic

Definition at line 20 of file aztec_hash_policy.hpp.


The documentation for this struct was generated from the following file: