Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
9 #ifndef __LIBSNARK_POLYNOMIAL_COMMITMENTS_KZG10_HPP__
10 #define __LIBSNARK_POLYNOMIAL_COMMITMENTS_KZG10_HPP__
14 #include <libff/algebra/curves/public_params.hpp>
15 #include <libff/algebra/fields/fp.hpp>
30 template<
typename ppT>
class kzg10
81 const Field &evaluation,
90 const Field &evaluation,
100 #endif // __LIBSNARK_POLYNOMIAL_COMMITMENTS_KZG10_HPP__
std::vector< libff::G1< ppT > > alpha_powers_g1
static commitment commit(const srs &srs, const polynomial< Field > &phi)
static Field evaluate_polynomial(const polynomial< Field > &phi, Field i)
std::vector< FieldT > polynomial
srs(std::vector< libff::G1< ppT >> &&alpha_powers_g1, const libff::G2< ppT > &alpha_g2)
static srs setup_from_secret(size_t max_degree, const Field &alpha)
Intended only for testing.
static bool verify_evaluation(const Field &i, const Field &evaluation, const srs &srs, const evaluation_witness &witness, const commitment &C)
libff::G1< ppT > commitment
static srs setup(size_t max_degree)
static bool verify_poly(const srs &srs, commitment C, const polynomial< Field > &phi)
static evaluation_witness create_evaluation_witness(const polynomial< Field > &phi, const Field &i, const Field &evaluation, const srs &srs)
libff::G2< ppT > alpha_g2
Secret \alpha encoded in G2: [\alpha]_2.
libff::G1< ppT > evaluation_witness
A witness for the evaluation of a polynomial at some point.