Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
merkle_authentication_path_variable.hpp
Go to the documentation of this file.
1 
8 #ifndef MERKLE_AUTHENTICATION_PATH_VARIABLE_HPP_
9 #define MERKLE_AUTHENTICATION_PATH_VARIABLE_HPP_
10 
14 
15 namespace libsnark
16 {
17 
18 template<typename FieldT, typename HashT>
20 {
21 public:
22  const size_t tree_depth;
23  std::vector<digest_variable<FieldT>> left_digests;
24  std::vector<digest_variable<FieldT>> right_digests;
25 
28  const size_t tree_depth,
29  const std::string &annotation_prefix);
30 
33  const size_t address, const merkle_authentication_path &path);
35  const size_t address) const;
36 };
37 
38 } // namespace libsnark
39 
41 
42 #endif // MERKLE_AUTHENTICATION_PATH_VARIABLE_HPP
libsnark::gadget::annotation_prefix
const std::string annotation_prefix
Definition: gadget.hpp:20
libsnark
Definition: accumulation_vector.hpp:18
libsnark::gadget::pb
protoboard< FieldT > & pb
Definition: gadget.hpp:19
merkle_authentication_path_variable.tcc
gadget.hpp
libsnark::merkle_authentication_path_variable::tree_depth
const size_t tree_depth
Definition: merkle_authentication_path_variable.hpp:22
libsnark::merkle_authentication_path_variable::right_digests
std::vector< digest_variable< FieldT > > right_digests
Definition: merkle_authentication_path_variable.hpp:24
libsnark::gadget
Definition: gadget.hpp:16
hash_io.hpp
merkle_tree.hpp
libsnark::merkle_authentication_path_variable::left_digests
std::vector< digest_variable< FieldT > > left_digests
Definition: merkle_authentication_path_variable.hpp:23
libsnark::merkle_authentication_path_variable::generate_r1cs_witness
void generate_r1cs_witness(const size_t address, const merkle_authentication_path &path)
libsnark::merkle_authentication_path_variable::merkle_authentication_path_variable
merkle_authentication_path_variable(protoboard< FieldT > &pb, const size_t tree_depth, const std::string &annotation_prefix)
libsnark::merkle_authentication_path_variable::generate_r1cs_constraints
void generate_r1cs_constraints()
libsnark::merkle_authentication_path_variable::get_authentication_path
merkle_authentication_path get_authentication_path(const size_t address) const
libsnark::merkle_authentication_path_variable
Definition: merkle_authentication_path_variable.hpp:19
libsnark::merkle_authentication_path
std::vector< merkle_authentication_node > merkle_authentication_path
Definition: merkle_tree.hpp:36
libsnark::protoboard
Definition: pb_variable.hpp:22