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

#include <hash_io.hpp>

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

Public Member Functions

 block_variable (protoboard< FieldT > &pb, const size_t block_size, const std::string &annotation_prefix)
 
 block_variable (protoboard< FieldT > &pb, const std::vector< pb_variable_array< FieldT >> &parts, const std::string &annotation_prefix)
 
 block_variable (protoboard< FieldT > &pb, const digest_variable< FieldT > &left, const digest_variable< FieldT > &right, const std::string &annotation_prefix)
 
void generate_r1cs_constraints ()
 
void generate_r1cs_witness (const libff::bit_vector &contents)
 
libff::bit_vector get_block () const
 
- Public Member Functions inherited from libsnark::gadget< FieldT >
 gadget (protoboard< FieldT > &pb, const std::string &annotation_prefix)
 

Public Attributes

size_t block_size
 
pb_variable_array< FieldT > bits
 

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

Definition at line 39 of file hash_io.hpp.

Constructor & Destructor Documentation

◆ block_variable() [1/3]

template<typename FieldT >
libsnark::block_variable< FieldT >::block_variable ( protoboard< FieldT > &  pb,
const size_t  block_size,
const std::string &  annotation_prefix 
)

◆ block_variable() [2/3]

template<typename FieldT >
libsnark::block_variable< FieldT >::block_variable ( protoboard< FieldT > &  pb,
const std::vector< pb_variable_array< FieldT >> &  parts,
const std::string &  annotation_prefix 
)

◆ block_variable() [3/3]

template<typename FieldT >
libsnark::block_variable< FieldT >::block_variable ( protoboard< FieldT > &  pb,
const digest_variable< FieldT > &  left,
const digest_variable< FieldT > &  right,
const std::string &  annotation_prefix 
)

Member Function Documentation

◆ generate_r1cs_constraints()

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

◆ generate_r1cs_witness()

template<typename FieldT >
void libsnark::block_variable< FieldT >::generate_r1cs_witness ( const libff::bit_vector &  contents)

◆ get_block()

template<typename FieldT >
libff::bit_vector libsnark::block_variable< FieldT >::get_block ( ) const

Member Data Documentation

◆ bits

template<typename FieldT >
pb_variable_array<FieldT> libsnark::block_variable< FieldT >::bits

Definition at line 43 of file hash_io.hpp.

◆ block_size

template<typename FieldT >
size_t libsnark::block_variable< FieldT >::block_size

Definition at line 42 of file hash_io.hpp.


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