#include <srs.hpp>
Public Types | |
typedef CurveType | curve_type |
typedef curve_type::template g1_type | g1_type |
typedef g1_type::value_type | g1_value_type |
typedef curve_type::template g2_type | g2_type |
typedef g2_type::value_type | g2_value_type |
typedef r1cs_gg_ppzksnark_aggregate_proving_srs< CurveType > | proving_srs_type |
typedef curve_type::scalar_field_type | scalar_field_type |
typedef scalar_field_type::value_type | scalar_field_value_type |
typedef std::pair< proving_srs_type, verification_srs_type > | srs_pair_type |
typedef r1cs_gg_ppzksnark_aggregate_verification_srs< CurveType > | verification_srs_type |
Public Member Functions | |
r1cs_gg_ppzksnark_aggregate_srs ()=default | |
r1cs_gg_ppzksnark_aggregate_srs (std::size_t num_proofs, const scalar_field_value_type &alpha, const scalar_field_value_type &beta) | |
srs_pair_type | specialize (std::size_t num_proofs) |
Public Attributes | |
std::vector< g1_value_type > | g_alpha_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS. More... | |
std::vector< g1_value_type > | g_beta_powers |
_{i=n}^{N}$ where N is the smallest size of the two Groth16 CRS. More... | |
std::vector< g2_value_type > | h_alpha_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS. More... | |
std::vector< g2_value_type > | h_beta_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS. More... | |
Static Public Attributes | |
static constexpr ProvingMode | mode = ProvingMode::Aggregate |
Detailed Description
template<typename CurveType>
struct nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >
It contains the maximum number of raw elements of the SRS needed to aggregate and verify Groth16 proofs. One can derive specialized prover and verifier key for specific size of aggregations by calling srs.specialize(n)
. The specialized prover key also contains precomputed tables that drastically increase prover's performance. This GenericSRS is usually formed from the transcript of two distinct power of taus ceremony ,in other words from two distinct Groth16 CRS. See there a way on how to generate this GenesisSRS.
Member Typedef Documentation
◆ curve_type
typedef CurveType nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::curve_type |
◆ g1_type
typedef curve_type::template g1_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g1_type |
◆ g1_value_type
typedef g1_type::value_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g1_value_type |
◆ g2_type
typedef curve_type::template g2_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g2_type |
◆ g2_value_type
typedef g2_type::value_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g2_value_type |
◆ proving_srs_type
typedef r1cs_gg_ppzksnark_aggregate_proving_srs<CurveType> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::proving_srs_type |
◆ scalar_field_type
typedef curve_type::scalar_field_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::scalar_field_type |
◆ scalar_field_value_type
typedef scalar_field_type::value_type nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::scalar_field_value_type |
◆ srs_pair_type
typedef std::pair<proving_srs_type, verification_srs_type> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::srs_pair_type |
◆ verification_srs_type
typedef r1cs_gg_ppzksnark_aggregate_verification_srs<CurveType> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::verification_srs_type |
Constructor & Destructor Documentation
◆ r1cs_gg_ppzksnark_aggregate_srs() [1/2]
|
default |
◆ r1cs_gg_ppzksnark_aggregate_srs() [2/2]
|
inline |
Member Function Documentation
◆ specialize()
|
inline |
specializes returns the prover and verifier SRS for a specific number of proofs to aggregate. The number of proofs MUST BE a power of two, it panics otherwise. The number of proofs must be inferior to half of the size of the generic srs otherwise it panics.
Member Data Documentation
◆ g_alpha_powers
std::vector<g1_value_type> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g_alpha_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
◆ g_beta_powers
std::vector<g1_value_type> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::g_beta_powers |
_{i=n}^{N}$ where N is the smallest size of the two Groth16 CRS.
◆ h_alpha_powers
std::vector<g2_value_type> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::h_alpha_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
◆ h_beta_powers
std::vector<g2_value_type> nil::crypto3::zk::snark::r1cs_gg_ppzksnark_aggregate_srs< CurveType >::h_beta_powers |
_{i=0}^{N}$ where N is the smallest size of the two Groth16 CRS.
◆ mode
|
staticconstexpr |
The documentation for this struct was generated from the following file: