Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <mnt_precomputation.hpp>
Public Types | |
typedef libff::Fr< ppT > | FieldT |
typedef libff::Fqe< other_curve< ppT > > | FqeT |
typedef libff::Fqk< other_curve< ppT > > | FqkT |
Public Member Functions | |
mnt_precompute_G2_gadget_addition_step (protoboard< FieldT > &pb, const bool invert_Q, const mnt_precompute_G2_gadget_coeffs< ppT > &cur, const mnt_precompute_G2_gadget_coeffs< ppT > &next, const G2_variable< ppT > &Q, const std::string &annotation_prefix) | |
void | generate_r1cs_constraints () |
void | generate_r1cs_witness () |
![]() | |
gadget (protoboard< libff::Fr< ppT > > &pb, const std::string &annotation_prefix) | |
Public Attributes | |
bool | invert_Q |
mnt_precompute_G2_gadget_coeffs< ppT > | cur |
mnt_precompute_G2_gadget_coeffs< ppT > | next |
G2_variable< ppT > | Q |
std::shared_ptr< Fqe_variable< ppT > > | RY_minus_QY |
std::shared_ptr< Fqe_variable< ppT > > | RX_minus_QX |
std::shared_ptr< Fqe_mul_gadget< ppT > > | compute_gamma |
std::shared_ptr< Fqe_mul_gadget< ppT > > | compute_gamma_X |
std::shared_ptr< Fqe_variable< ppT > > | next_RX_plus_RX_plus_QX |
std::shared_ptr< Fqe_sqr_gadget< ppT > > | compute_next_RX |
std::shared_ptr< Fqe_variable< ppT > > | RX_minus_next_RX |
std::shared_ptr< Fqe_variable< ppT > > | RY_plus_next_RY |
std::shared_ptr< Fqe_mul_gadget< ppT > > | compute_next_RY |
Additional Inherited Members | |
![]() | |
protoboard< libff::Fr< ppT > > & | pb |
const std::string | annotation_prefix |
Technical note:
G2_precompute_addition_step relates coeffs[i] and coeffs[i+1] as follows
coeffs[i] gamma = (RY - QY) * (RX - QX).inverse() gamma_X = gamma * QX
coeffs[i+1] RX = prev_gamma^2 + (prev_RX + QX) RY = prev_gamma * (prev_RX - RX) - prev_RY
(where prev_ in [i+1] refer to things from [i])
If invert_Q is set to true: use -QY in place of QY everywhere above.
Definition at line 230 of file mnt_precomputation.hpp.
typedef libff::Fr<ppT> libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::FieldT |
Definition at line 233 of file mnt_precomputation.hpp.
typedef libff::Fqe<other_curve<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::FqeT |
Definition at line 234 of file mnt_precomputation.hpp.
typedef libff::Fqk<other_curve<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::FqkT |
Definition at line 235 of file mnt_precomputation.hpp.
libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::mnt_precompute_G2_gadget_addition_step | ( | protoboard< FieldT > & | pb, |
const bool | invert_Q, | ||
const mnt_precompute_G2_gadget_coeffs< ppT > & | cur, | ||
const mnt_precompute_G2_gadget_coeffs< ppT > & | next, | ||
const G2_variable< ppT > & | Q, | ||
const std::string & | annotation_prefix | ||
) |
void libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::generate_r1cs_constraints | ( | ) |
void libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::generate_r1cs_witness | ( | ) |
std::shared_ptr<Fqe_mul_gadget<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::compute_gamma |
Definition at line 244 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_mul_gadget<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::compute_gamma_X |
Definition at line 245 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_sqr_gadget<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::compute_next_RX |
Definition at line 248 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_mul_gadget<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::compute_next_RY |
Definition at line 252 of file mnt_precomputation.hpp.
mnt_precompute_G2_gadget_coeffs<ppT> libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::cur |
Definition at line 238 of file mnt_precomputation.hpp.
bool libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::invert_Q |
Definition at line 237 of file mnt_precomputation.hpp.
mnt_precompute_G2_gadget_coeffs<ppT> libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::next |
Definition at line 239 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_variable<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::next_RX_plus_RX_plus_QX |
Definition at line 247 of file mnt_precomputation.hpp.
G2_variable<ppT> libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::Q |
Definition at line 240 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_variable<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::RX_minus_next_RX |
Definition at line 250 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_variable<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::RX_minus_QX |
Definition at line 243 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_variable<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::RY_minus_QY |
Definition at line 242 of file mnt_precomputation.hpp.
std::shared_ptr<Fqe_variable<ppT> > libsnark::mnt_precompute_G2_gadget_addition_step< ppT >::RY_plus_next_RY |
Definition at line 251 of file mnt_precomputation.hpp.