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

#include <basic_gadgets.hpp>

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

Public Member Functions

 bit_vector_copy_gadget (protoboard< FieldT > &pb, const pb_variable_array< FieldT > &source_bits, const pb_variable_array< FieldT > &target_bits, const pb_linear_combination< FieldT > &do_copy, const size_t chunk_size, const std::string &annotation_prefix="")
 
void generate_r1cs_constraints (const bool enforce_source_bitness, const bool enforce_target_bitness)
 
void generate_r1cs_witness ()
 
- Public Member Functions inherited from libsnark::gadget< FieldT >
 gadget (protoboard< FieldT > &pb, const std::string &annotation_prefix)
 

Public Attributes

const pb_variable_array< FieldT > source_bits
 
const pb_variable_array< FieldT > target_bits
 
const pb_linear_combination< FieldT > do_copy
 
pb_variable_array< FieldT > packed_source
 
pb_variable_array< FieldT > packed_target
 
std::shared_ptr< multipacking_gadget< FieldT > > pack_source
 
std::shared_ptr< multipacking_gadget< FieldT > > pack_target
 
std::shared_ptr< field_vector_copy_gadget< FieldT > > copier
 
const size_t chunk_size
 
const size_t num_chunks
 

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::bit_vector_copy_gadget< FieldT >

Definition at line 101 of file basic_gadgets.hpp.

Constructor & Destructor Documentation

◆ bit_vector_copy_gadget()

template<typename FieldT >
libsnark::bit_vector_copy_gadget< FieldT >::bit_vector_copy_gadget ( protoboard< FieldT > &  pb,
const pb_variable_array< FieldT > &  source_bits,
const pb_variable_array< FieldT > &  target_bits,
const pb_linear_combination< FieldT > &  do_copy,
const size_t  chunk_size,
const std::string &  annotation_prefix = "" 
)

Member Function Documentation

◆ generate_r1cs_constraints()

template<typename FieldT >
void libsnark::bit_vector_copy_gadget< FieldT >::generate_r1cs_constraints ( const bool  enforce_source_bitness,
const bool  enforce_target_bitness 
)

◆ generate_r1cs_witness()

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

Member Data Documentation

◆ chunk_size

template<typename FieldT >
const size_t libsnark::bit_vector_copy_gadget< FieldT >::chunk_size

Definition at line 115 of file basic_gadgets.hpp.

◆ copier

template<typename FieldT >
std::shared_ptr<field_vector_copy_gadget<FieldT> > libsnark::bit_vector_copy_gadget< FieldT >::copier

Definition at line 113 of file basic_gadgets.hpp.

◆ do_copy

template<typename FieldT >
const pb_linear_combination<FieldT> libsnark::bit_vector_copy_gadget< FieldT >::do_copy

Definition at line 106 of file basic_gadgets.hpp.

◆ num_chunks

template<typename FieldT >
const size_t libsnark::bit_vector_copy_gadget< FieldT >::num_chunks

Definition at line 116 of file basic_gadgets.hpp.

◆ pack_source

template<typename FieldT >
std::shared_ptr<multipacking_gadget<FieldT> > libsnark::bit_vector_copy_gadget< FieldT >::pack_source

Definition at line 111 of file basic_gadgets.hpp.

◆ pack_target

template<typename FieldT >
std::shared_ptr<multipacking_gadget<FieldT> > libsnark::bit_vector_copy_gadget< FieldT >::pack_target

Definition at line 112 of file basic_gadgets.hpp.

◆ packed_source

template<typename FieldT >
pb_variable_array<FieldT> libsnark::bit_vector_copy_gadget< FieldT >::packed_source

Definition at line 108 of file basic_gadgets.hpp.

◆ packed_target

template<typename FieldT >
pb_variable_array<FieldT> libsnark::bit_vector_copy_gadget< FieldT >::packed_target

Definition at line 109 of file basic_gadgets.hpp.

◆ source_bits

template<typename FieldT >
const pb_variable_array<FieldT> libsnark::bit_vector_copy_gadget< FieldT >::source_bits

Definition at line 104 of file basic_gadgets.hpp.

◆ target_bits

template<typename FieldT >
const pb_variable_array<FieldT> libsnark::bit_vector_copy_gadget< FieldT >::target_bits

Definition at line 105 of file basic_gadgets.hpp.


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