nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType > Class Template Reference

#include <mp_pcd_circuits.hpp>

+ Collaboration diagram for nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >:

Public Types

typedef CurveType::scalar_field_type FieldType
 

Public Member Functions

void generate_r1cs_constraints ()
 
void generate_r1cs_witness (const set_commitment &commitment_to_translation_step_r1cs_vks, const std::vector< r1cs_ppzksnark_verification_key< other_curve< CurveType >>> &mp_translation_step_pcd_circuit_vks, const std::vector< set_membership_proof > &vk_membership_proofs, const r1cs_pcd_compliance_predicate_primary_input< FieldType > &compliance_predicate_primary_input, const r1cs_pcd_compliance_predicate_auxiliary_input< FieldType > &compliance_predicate_auxiliary_input, const std::vector< r1cs_ppzksnark_proof< other_curve< CurveType >>> &translation_step_proofs)
 
snark::r1cs_auxiliary_input< FieldTypeget_auxiliary_input () const
 
snark::r1cs_constraint_system< FieldTypeget_circuit () const
 
snark::r1cs_primary_input< FieldTypeget_primary_input () const
 
 mp_compliance_step_pcd_circuit_maker (const r1cs_pcd_compliance_predicate< FieldType > &compliance_predicate, const std::size_t max_number_of_predicates)
 

Static Public Member Functions

static std::size_t field_capacity ()
 
static std::size_t field_logsize ()
 
static std::size_t input_capacity_in_bits ()
 
static std::size_t input_size_in_bits ()
 
static std::size_t input_size_in_elts ()
 

Public Attributes

blueprint_variable< FieldTypearity
 
std::vector< block_variable< FieldType > > block_for_incoming_messages
 
std::shared_ptr< block_variable< FieldType > > block_for_outgoing_message
 
blueprint< FieldTypebp
 
std::shared_ptr< set_commitment_variable< FieldType, crh_with_bit_out_component< FieldType > > > commitment
 
std::vector< blueprint_variable_vector< FieldType > > commitment_and_incoming_message_digests
 
std::vector< blueprint_variable_vector< FieldType > > commitment_and_incoming_messages_digest_bits
 
blueprint_variable< FieldTypecommon_type
 
blueprint_variable_vector< FieldTypecommon_type_check_aux
 
r1cs_pcd_compliance_predicate< FieldTypecompliance_predicate
 
std::shared_ptr< component_from_r1cs< FieldType > > compliance_predicate_as_component
 
blueprint_variable_vector< FieldTypecp_witness
 
std::vector< crh_with_field_out_component< FieldType > > hash_incoming_messages
 
std::shared_ptr< crh_with_field_out_component< FieldType > > hash_outgoing_message
 
std::vector< blueprint_variable_vector< FieldType > > incoming_message_payloads
 
std::vector< blueprint_variable< FieldType > > incoming_message_types
 
std::vector< blueprint_variable_vector< FieldType > > incoming_message_vars
 
std::vector< blueprint_variable_vector< FieldType > > incoming_messages_bits
 
blueprint_variable_vector< FieldTypelocal_data
 
blueprint_variable_vector< FieldTypemembership_check_results
 
std::vector< set_commitment_component< FieldType, crh_with_bit_out_component< FieldType > > > membership_checkers
 
std::vector< set_membership_proof_variable< FieldType, crh_with_bit_out_component< FieldType > > > membership_proofs
 
blueprint_variable_vector< FieldTypemp_compliance_step_pcd_circuit_input
 
blueprint_variable_vector< FieldTypeoutgoing_message_bits
 
blueprint_variable_vector< FieldTypeoutgoing_message_payload
 
blueprint_variable< FieldTypeoutgoing_message_type
 
blueprint_variable_vector< FieldTypeoutgoing_message_vars
 
std::vector< blueprint_variable_vector< FieldType > > padded_commitment_and_incoming_messages_digest
 
blueprint_variable_vector< FieldTypepadded_translation_step_vk_and_outgoing_message_digest
 
std::vector< r1cs_ppzksnark_proof_variable< CurveType > > proof
 
std::vector< r1cs_ppzksnark_verification_key_variable< CurveType > > translation_step_vks
 
std::vector< blueprint_variable_vector< FieldType > > translation_step_vks_bits
 
std::vector< multipacking_component< FieldType > > unpack_commitment_and_incoming_message_digests
 
std::vector< multipacking_component< FieldType > > unpack_incoming_messages
 
std::shared_ptr< multipacking_component< FieldType > > unpack_outgoing_message
 
blueprint_variable_vector< FieldTypeverification_results
 
std::vector< r1cs_ppzksnark_verifier_component< CurveType > > verifier
 
std::vector< blueprint_variable_vector< FieldType > > verifier_input
 
blueprint_variable< FieldTypezero
 

Detailed Description

template<typename CurveType>
class nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >

A compliance-step PCD circuit.

The circuit is an R1CS that checks compliance (for the given compliance predicate) and validity of previous proofs.

Member Typedef Documentation

◆ FieldType

template<typename CurveType >
typedef CurveType::scalar_field_type nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::FieldType

Constructor & Destructor Documentation

◆ mp_compliance_step_pcd_circuit_maker()

template<typename CurveType >
nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::mp_compliance_step_pcd_circuit_maker ( const r1cs_pcd_compliance_predicate< FieldType > &  compliance_predicate,
const std::size_t  max_number_of_predicates 
)

Member Function Documentation

◆ field_capacity()

template<typename CurveType >
std::size_t nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::field_capacity
static

◆ field_logsize()

template<typename CurveType >
std::size_t nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::field_logsize
static

◆ generate_r1cs_constraints()

template<typename CurveType >
void nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::generate_r1cs_constraints

◆ generate_r1cs_witness()

template<typename CurveType >
void nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::generate_r1cs_witness ( const set_commitment commitment_to_translation_step_r1cs_vks,
const std::vector< r1cs_ppzksnark_verification_key< other_curve< CurveType >>> &  mp_translation_step_pcd_circuit_vks,
const std::vector< set_membership_proof > &  vk_membership_proofs,
const r1cs_pcd_compliance_predicate_primary_input< FieldType > &  compliance_predicate_primary_input,
const r1cs_pcd_compliance_predicate_auxiliary_input< FieldType > &  compliance_predicate_auxiliary_input,
const std::vector< r1cs_ppzksnark_proof< other_curve< CurveType >>> &  translation_step_proofs 
)

◆ get_auxiliary_input()

template<typename CurveType >
snark::r1cs_auxiliary_input< typename CurveType::scalar_field_type > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::get_auxiliary_input

◆ get_circuit()

template<typename CurveType >
snark::r1cs_constraint_system< typename CurveType::scalar_field_type > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::get_circuit

◆ get_primary_input()

template<typename CurveType >
snark::r1cs_primary_input< typename CurveType::scalar_field_type > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::get_primary_input

◆ input_capacity_in_bits()

template<typename CurveType >
std::size_t nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::input_capacity_in_bits
static

◆ input_size_in_bits()

template<typename CurveType >
std::size_t nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::input_size_in_bits
static

◆ input_size_in_elts()

template<typename CurveType >
std::size_t nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::input_size_in_elts
static

Member Data Documentation

◆ arity

template<typename CurveType >
blueprint_variable<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::arity

◆ block_for_incoming_messages

template<typename CurveType >
std::vector<block_variable<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::block_for_incoming_messages

◆ block_for_outgoing_message

template<typename CurveType >
std::shared_ptr<block_variable<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::block_for_outgoing_message

◆ bp

template<typename CurveType >
blueprint<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::bp

◆ commitment

template<typename CurveType >
std::shared_ptr<set_commitment_variable<FieldType, crh_with_bit_out_component<FieldType> > > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::commitment

◆ commitment_and_incoming_message_digests

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::commitment_and_incoming_message_digests

◆ commitment_and_incoming_messages_digest_bits

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::commitment_and_incoming_messages_digest_bits

◆ common_type

template<typename CurveType >
blueprint_variable<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::common_type

◆ common_type_check_aux

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::common_type_check_aux

◆ compliance_predicate

template<typename CurveType >
r1cs_pcd_compliance_predicate<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::compliance_predicate

◆ compliance_predicate_as_component

template<typename CurveType >
std::shared_ptr<component_from_r1cs<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::compliance_predicate_as_component

◆ cp_witness

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::cp_witness

◆ hash_incoming_messages

template<typename CurveType >
std::vector<crh_with_field_out_component<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::hash_incoming_messages

◆ hash_outgoing_message

template<typename CurveType >
std::shared_ptr<crh_with_field_out_component<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::hash_outgoing_message

◆ incoming_message_payloads

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::incoming_message_payloads

◆ incoming_message_types

template<typename CurveType >
std::vector<blueprint_variable<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::incoming_message_types

◆ incoming_message_vars

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::incoming_message_vars

◆ incoming_messages_bits

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::incoming_messages_bits

◆ local_data

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::local_data

◆ membership_check_results

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::membership_check_results

◆ membership_checkers

template<typename CurveType >
std::vector<set_commitment_component<FieldType, crh_with_bit_out_component<FieldType> > > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::membership_checkers

◆ membership_proofs

template<typename CurveType >
std::vector<set_membership_proof_variable<FieldType, crh_with_bit_out_component<FieldType> > > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::membership_proofs

◆ mp_compliance_step_pcd_circuit_input

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::mp_compliance_step_pcd_circuit_input

◆ outgoing_message_bits

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::outgoing_message_bits

◆ outgoing_message_payload

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::outgoing_message_payload

◆ outgoing_message_type

template<typename CurveType >
blueprint_variable<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::outgoing_message_type

◆ outgoing_message_vars

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::outgoing_message_vars

◆ padded_commitment_and_incoming_messages_digest

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::padded_commitment_and_incoming_messages_digest

◆ padded_translation_step_vk_and_outgoing_message_digest

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::padded_translation_step_vk_and_outgoing_message_digest

◆ proof

template<typename CurveType >
std::vector<r1cs_ppzksnark_proof_variable<CurveType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::proof

◆ translation_step_vks

template<typename CurveType >
std::vector<r1cs_ppzksnark_verification_key_variable<CurveType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::translation_step_vks

◆ translation_step_vks_bits

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::translation_step_vks_bits

◆ unpack_commitment_and_incoming_message_digests

template<typename CurveType >
std::vector<multipacking_component<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::unpack_commitment_and_incoming_message_digests

◆ unpack_incoming_messages

template<typename CurveType >
std::vector<multipacking_component<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::unpack_incoming_messages

◆ unpack_outgoing_message

template<typename CurveType >
std::shared_ptr<multipacking_component<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::unpack_outgoing_message

◆ verification_results

template<typename CurveType >
blueprint_variable_vector<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::verification_results

◆ verifier

template<typename CurveType >
std::vector<r1cs_ppzksnark_verifier_component<CurveType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::verifier

◆ verifier_input

template<typename CurveType >
std::vector<blueprint_variable_vector<FieldType> > nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::verifier_input

◆ zero

template<typename CurveType >
blueprint_variable<FieldType> nil::crypto3::zk::snark::mp_compliance_step_pcd_circuit_maker< CurveType >::zero

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