Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
12 #ifndef SET_COMMITMENT_HPP_
13 #define SET_COMMITMENT_HPP_
15 #include <libff/common/utils.hpp>
39 std::shared_ptr<merkle_tree<HashT>> tree;
40 std::map<libff::bit_vector, size_t> hash_to_pos;
48 const size_t max_entries,
const size_t value_size = 0);
50 void add(
const libff::bit_vector &value);
51 bool is_in_set(
const libff::bit_vector &value)
const;
55 const libff::bit_vector &value)
const;
65 #endif // SET_COMMITMENT_HPP_
void add(const libff::bit_vector &value)
friend std::ostream & operator<<(std::ostream &out, const set_membership_proof &other)
libff::bit_vector set_commitment
set_commitment_accumulator(const size_t max_entries, const size_t value_size=0)
set_commitment get_commitment() const
set_membership_proof get_membership_proof(const libff::bit_vector &value) const
size_t size_in_bits() const
merkle_authentication_path merkle_path
bool is_in_set(const libff::bit_vector &value) const
bool operator==(const set_membership_proof &other) const
friend std::istream & operator>>(std::istream &in, set_membership_proof &other)
std::vector< merkle_authentication_node > merkle_authentication_path