Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
libsnark::knapsack_CRH_with_bit_out_gadget< FieldT > Class Template Reference

#include <knapsack_gadget.hpp>

Inheritance diagram for libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >:
Inheritance graph
[legend]
Collaboration diagram for libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >:
Collaboration graph
[legend]

Public Types

typedef libff::bit_vector hash_value_type
 
typedef merkle_authentication_path merkle_authentication_path_type
 

Public Member Functions

 knapsack_CRH_with_bit_out_gadget (protoboard< FieldT > &pb, const size_t input_len, const block_variable< FieldT > &input_block, const digest_variable< FieldT > &output_digest, const std::string &annotation_prefix)
 
void generate_r1cs_constraints (const bool enforce_bitness=true)
 
void generate_r1cs_witness ()
 
- Public Member Functions inherited from libsnark::gadget< FieldT >
 gadget (protoboard< FieldT > &pb, const std::string &annotation_prefix)
 

Static Public Member Functions

static size_t get_digest_len ()
 
static size_t get_block_len ()
 
static hash_value_type get_hash (const libff::bit_vector &input)
 
static void sample_randomness (const size_t input_len)
 
static size_t expected_constraints (const bool enforce_bitness=true)
 

Public Attributes

size_t input_len
 
size_t dimension
 
pb_linear_combination_array< FieldT > output
 
std::shared_ptr< knapsack_CRH_with_field_out_gadget< FieldT > > hasher
 
block_variable< FieldT > input_block
 
digest_variable< FieldT > output_digest
 

Additional Inherited Members

- Protected Attributes inherited from libsnark::gadget< FieldT >
protoboard< FieldT > & pb
 
const std::string annotation_prefix
 

Detailed Description

template<typename FieldT>
class libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >

Definition at line 100 of file knapsack_gadget.hpp.

Member Typedef Documentation

◆ hash_value_type

template<typename FieldT >
typedef libff::bit_vector libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::hash_value_type

Definition at line 103 of file knapsack_gadget.hpp.

◆ merkle_authentication_path_type

Definition at line 104 of file knapsack_gadget.hpp.

Constructor & Destructor Documentation

◆ knapsack_CRH_with_bit_out_gadget()

template<typename FieldT >
libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::knapsack_CRH_with_bit_out_gadget ( protoboard< FieldT > &  pb,
const size_t  input_len,
const block_variable< FieldT > &  input_block,
const digest_variable< FieldT > &  output_digest,
const std::string &  annotation_prefix 
)

Member Function Documentation

◆ expected_constraints()

template<typename FieldT >
static size_t libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::expected_constraints ( const bool  enforce_bitness = true)
static

◆ generate_r1cs_constraints()

template<typename FieldT >
void libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::generate_r1cs_constraints ( const bool  enforce_bitness = true)

◆ generate_r1cs_witness()

template<typename FieldT >
void libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::generate_r1cs_witness ( )

◆ get_block_len()

template<typename FieldT >
static size_t libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::get_block_len ( )
static

◆ get_digest_len()

template<typename FieldT >
static size_t libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::get_digest_len ( )
static

◆ get_hash()

template<typename FieldT >
static hash_value_type libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::get_hash ( const libff::bit_vector &  input)
static

◆ sample_randomness()

template<typename FieldT >
static void libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::sample_randomness ( const size_t  input_len)
static

Member Data Documentation

◆ dimension

template<typename FieldT >
size_t libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::dimension

Definition at line 107 of file knapsack_gadget.hpp.

◆ hasher

template<typename FieldT >
std::shared_ptr<knapsack_CRH_with_field_out_gadget<FieldT> > libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::hasher

Definition at line 111 of file knapsack_gadget.hpp.

◆ input_block

template<typename FieldT >
block_variable<FieldT> libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::input_block

Definition at line 113 of file knapsack_gadget.hpp.

◆ input_len

template<typename FieldT >
size_t libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::input_len

Definition at line 106 of file knapsack_gadget.hpp.

◆ output

template<typename FieldT >
pb_linear_combination_array<FieldT> libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::output

Definition at line 109 of file knapsack_gadget.hpp.

◆ output_digest

template<typename FieldT >
digest_variable<FieldT> libsnark::knapsack_CRH_with_bit_out_gadget< FieldT >::output_digest

Definition at line 114 of file knapsack_gadget.hpp.


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