nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType > Class Template Reference

#include <knapsack_component.hpp>

+ Inheritance diagram for nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >:
+ Collaboration diagram for nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >:

Public Types

typedef std::vector< bool > hash_value_type
 
typedef digest_variable< FieldType > hash_variable_type
 
typedef snark::merkle_authentication_path merkle_authentication_path_type
 

Public Member Functions

void generate_r1cs_constraints (bool enforce_bitness=true)
 
void generate_r1cs_witness ()
 
 knapsack_crh_with_bit_out_component (blueprint< FieldType > &bp, std::size_t input_len, const block_variable< FieldType > &input_block, const digest_variable< FieldType > &output_digest)
 

Static Public Member Functions

static std::size_t expected_constraints (bool enforce_bitness=true)
 
static std::size_t get_block_len ()
 
static std::size_t get_digest_len ()
 
static hash_value_type get_hash (const std::vector< bool > &input)
 
static void sample_randomness (std::size_t input_len)
 

Public Attributes

std::size_t dimension
 
std::shared_ptr< knapsack_crh_with_field_out_component< FieldType > > hasher
 
block_variable< FieldType > input_block
 
std::size_t input_len
 
blueprint_linear_combination_vector< FieldType > output
 
digest_variable< FieldType > output_digest
 

Protected Attributes

blueprint< FieldType > & bp
 

Member Typedef Documentation

◆ hash_value_type

template<typename FieldType >
typedef std::vector<bool> nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::hash_value_type

◆ hash_variable_type

template<typename FieldType >
typedef digest_variable<FieldType> nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::hash_variable_type

◆ merkle_authentication_path_type

Constructor & Destructor Documentation

◆ knapsack_crh_with_bit_out_component()

template<typename FieldType >
nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::knapsack_crh_with_bit_out_component ( blueprint< FieldType > &  bp,
std::size_t  input_len,
const block_variable< FieldType > &  input_block,
const digest_variable< FieldType > &  output_digest 
)
inline

Member Function Documentation

◆ expected_constraints()

template<typename FieldType >
static std::size_t nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::expected_constraints ( bool  enforce_bitness = true)
inlinestatic

◆ generate_r1cs_constraints()

template<typename FieldType >
void nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::generate_r1cs_constraints ( bool  enforce_bitness = true)
inline

◆ generate_r1cs_witness()

template<typename FieldType >
void nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::generate_r1cs_witness ( )
inline

◆ get_block_len()

template<typename FieldType >
static std::size_t nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::get_block_len ( )
inlinestatic

◆ get_digest_len()

template<typename FieldType >
static std::size_t nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::get_digest_len ( )
inlinestatic

◆ get_hash()

template<typename FieldType >
static hash_value_type nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::get_hash ( const std::vector< bool > &  input)
inlinestatic

◆ sample_randomness()

template<typename FieldType >
static void nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::sample_randomness ( std::size_t  input_len)
inlinestatic

Member Data Documentation

◆ bp

template<typename FieldType >
blueprint<FieldType>& nil::crypto3::zk::components::component< FieldType >::bp
protectedinherited

◆ dimension

template<typename FieldType >
std::size_t nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::dimension

◆ hasher

template<typename FieldType >
std::shared_ptr<knapsack_crh_with_field_out_component<FieldType> > nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::hasher

◆ input_block

template<typename FieldType >
block_variable<FieldType> nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::input_block

◆ input_len

template<typename FieldType >
std::size_t nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::input_len

◆ output

◆ output_digest

template<typename FieldType >
digest_variable<FieldType> nil::crypto3::zk::components::knapsack_crh_with_bit_out_component< FieldType >::output_digest

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