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

#include <knapsack_gadget.hpp>

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

Public Member Functions

 knapsack_CRH_with_field_out_gadget (protoboard< FieldT > &pb, const size_t input_len, const block_variable< FieldT > &input_block, const pb_linear_combination_array< FieldT > &output, const std::string &annotation_prefix)
 
void generate_r1cs_constraints ()
 
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 std::vector< FieldT > get_hash (const libff::bit_vector &input)
 
static void sample_randomness (const size_t input_len)
 
static size_t expected_constraints ()
 

Public Attributes

size_t input_len
 
size_t dimension
 
block_variable< FieldT > input_block
 
pb_linear_combination_array< FieldT > output
 

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_field_out_gadget< FieldT >

Definition at line 65 of file knapsack_gadget.hpp.

Constructor & Destructor Documentation

◆ knapsack_CRH_with_field_out_gadget()

template<typename FieldT >
libsnark::knapsack_CRH_with_field_out_gadget< FieldT >::knapsack_CRH_with_field_out_gadget ( protoboard< FieldT > &  pb,
const size_t  input_len,
const block_variable< FieldT > &  input_block,
const pb_linear_combination_array< FieldT > &  output,
const std::string &  annotation_prefix 
)

Member Function Documentation

◆ expected_constraints()

template<typename FieldT >
static size_t libsnark::knapsack_CRH_with_field_out_gadget< FieldT >::expected_constraints ( )
static

◆ generate_r1cs_constraints()

template<typename FieldT >
void libsnark::knapsack_CRH_with_field_out_gadget< FieldT >::generate_r1cs_constraints ( )

◆ generate_r1cs_witness()

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

◆ get_block_len()

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

◆ get_digest_len()

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

◆ get_hash()

template<typename FieldT >
static std::vector<FieldT> libsnark::knapsack_CRH_with_field_out_gadget< FieldT >::get_hash ( const libff::bit_vector &  input)
static

◆ sample_randomness()

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

Member Data Documentation

◆ dimension

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

Definition at line 73 of file knapsack_gadget.hpp.

◆ input_block

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

Definition at line 75 of file knapsack_gadget.hpp.

◆ input_len

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

Definition at line 72 of file knapsack_gadget.hpp.

◆ output

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

Definition at line 76 of file knapsack_gadget.hpp.


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