knapsack_component.hpp
Go to the documentation of this file.
38 // - knapsack_crh_with_bit_out_component, which verifies H_M when its output is "expanded" to bits.
Definition: hash_io.hpp:84
Definition: blueprint_linear_combination.hpp:115
Definition: blueprint_variable.hpp:57
void fill_with_bits_of_field_element(blueprint< field_type > &bp, const field_value_type &r) const
Definition: blueprint_variable.hpp:118
Definition: blueprint.hpp:46
Definition: component.hpp:37
Definition: hash_io.hpp:43
blueprint_variable_vector< FieldType > bits
Definition: hash_io.hpp:46
Definition: knapsack_component.hpp:193
blueprint_linear_combination_vector< FieldType > output
Definition: knapsack_component.hpp:202
block_variable< FieldType > input_block
Definition: knapsack_component.hpp:206
digest_variable< FieldType > output_digest
Definition: knapsack_component.hpp:207
static std::size_t get_digest_len()
Definition: knapsack_component.hpp:254
std::size_t input_len
Definition: knapsack_component.hpp:199
void generate_r1cs_constraints(bool enforce_bitness=true)
Definition: knapsack_component.hpp:231
snark::merkle_authentication_path merkle_authentication_path_type
Definition: knapsack_component.hpp:197
digest_variable< FieldType > hash_variable_type
Definition: knapsack_component.hpp:196
void generate_r1cs_witness()
Definition: knapsack_component.hpp:241
std::shared_ptr< knapsack_crh_with_field_out_component< FieldType > > hasher
Definition: knapsack_component.hpp:204
static std::size_t get_block_len()
Definition: knapsack_component.hpp:259
std::vector< bool > hash_value_type
Definition: knapsack_component.hpp:195
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)
Definition: knapsack_component.hpp:209
std::size_t dimension
Definition: knapsack_component.hpp:200
static std::size_t expected_constraints(bool enforce_bitness=true)
Definition: knapsack_component.hpp:291
static void sample_randomness(std::size_t input_len)
Definition: knapsack_component.hpp:286
static hash_value_type get_hash(const std::vector< bool > &input)
Definition: knapsack_component.hpp:262
Definition: knapsack_component.hpp:87
blueprint_linear_combination_vector< FieldType > hash_variable_type
Definition: knapsack_component.hpp:94
block_variable< FieldType > input_block
Definition: knapsack_component.hpp:98
std::size_t input_len
Definition: knapsack_component.hpp:95
static std::size_t get_digest_len()
Definition: knapsack_component.hpp:142
static void sample_randomness(std::size_t input_len)
Definition: knapsack_component.hpp:170
static std::size_t expected_constraints()
Definition: knapsack_component.hpp:185
void generate_r1cs_witness()
Definition: knapsack_component.hpp:127
std::size_t dimension
Definition: knapsack_component.hpp:96
std::vector< typename FieldType::value_type > hash_value_type
Definition: knapsack_component.hpp:93
knapsack_crh_with_field_out_component(blueprint< FieldType > &bp, std::size_t input_len, const block_variable< FieldType > &input_block, const blueprint_linear_combination_vector< FieldType > &output)
Definition: knapsack_component.hpp:101
static std::size_t get_block_len()
Definition: knapsack_component.hpp:147
blueprint_linear_combination_vector< FieldType > output
Definition: knapsack_component.hpp:99
static std::vector< typename FieldType::value_type > get_hash(const std::vector< bool > &input)
Definition: knapsack_component.hpp:151
void generate_r1cs_constraints()
Definition: knapsack_component.hpp:115
constexpr T sum(const vector< T, N > &v)
computes the sum of elements
Definition: algebra/include/nil/crypto3/algebra/vector/math.hpp:124
std::vector< merkle_authentication_node > merkle_authentication_path
Definition: blueprint/include/nil/crypto3/zk/merkle_tree.hpp:66
Definition: pair.hpp:31
Definition: knapsack_component.hpp:79
static const std::size_t dimension
Definition: knapsack_component.hpp:81
Definition: r1cs.hpp:60