Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
15 #ifndef WEIERSTRASS_G1_GADGET_HPP_
16 #define WEIERSTRASS_G1_GADGET_HPP_
22 #include <libff/algebra/curves/public_params.hpp>
68 template<
typename ppT>
162 template<
typename ppT>
197 template<
typename wppT, mp_
size_t scalarLimbs>
199 libff::G1<other_curve<wppT>>,
203 libff::bigint<scalarLimbs>>;
205 template<
typename wppT>
209 template<
typename wppT>
212 libff::G1<other_curve<wppT>>,
216 template<
typename wppT>
220 libff::G1<other_curve<wppT>>,
224 template<
typename wppT>
227 libff::G1<other_curve<wppT>>,
232 template<
typename wppT>
236 libff::G1<other_curve<wppT>>,
241 template<
typename wppT>
244 libff::G1<other_curve<wppT>>,
248 template<
typename wppT>
251 libff::G1<other_curve<wppT>>,
261 #endif // WEIERSTRASS_G1_GADGET_TCC_
libff::G1< other_curve< ppT > > get_element() const
const std::string annotation_prefix
pb_variable< FieldT > P_X_squared
pb_linear_combination< FieldT > Y
pb_variable< FieldT > lambda
G1_variable< ppT > result
protoboard< libff::Fr< ppT > > & pb
G1_variable< ppT > result
G1_checker_gadget(protoboard< FieldT > &pb, const G1_variable< ppT > &P, const std::string &annotation_prefix)
static size_t num_variables()
void generate_r1cs_constraints()
pb_variable< FieldT > inv
void generate_r1cs_witness(const libff::G1< other_curve< ppT >> &elt)
void generate_r1cs_witness()
pb_variable_array< FieldT > scalars
void generate_r1cs_constraints()
pb_linear_combination_array< FieldT > all_vars
G1_variable< ppT > result
const G1_variable< ppT > zero_case
std::vector< G1_variable< ppT > > chosen_results
std::vector< G1_add_gadget< ppT > > adders
void generate_r1cs_witness()
std::vector< G1_variable< ppT > > points
void generate_r1cs_witness()
pb_variable< FieldT > P_Y_squared
G1_variable_selector_gadget(protoboard< Field > &pb, const pb_linear_combination< Field > &selector, const G1_variable< ppT > &zero_case, const G1_variable< ppT > &one_case, const G1_variable< ppT > &result, const std::string &annotation_prefix)
std::vector< G1_variable< ppT > > points_and_powers
Selector gadget for variable_or_identity.
Gadget that represents a G1 variable.
pb_linear_combination< FieldT > X
const G1_variable< ppT > one_case
void generate_r1cs_constraints()
G1_add_gadget(protoboard< FieldT > &pb, const G1_variable< ppT > &A, const G1_variable< ppT > &B, const G1_variable< ppT > &result, const std::string &annotation_prefix)
void generate_r1cs_constraints()
void generate_r1cs_witness()
typename pairing_selector< ppT >::other_curve_type other_curve
pb_variable< FieldT > Xsquared
G1_variable(protoboard< FieldT > &pb, const std::string &annotation_prefix)
pb_variable< FieldT > lambda
void generate_r1cs_witness()
G1_variable operator-() const
G1_multiscalar_mul_gadget(protoboard< FieldT > &pb, const G1_variable< ppT > &base, const pb_variable_array< FieldT > &scalars, const size_t elt_size, const std::vector< G1_variable< ppT >> &points, const G1_variable< ppT > &result, const std::string &annotation_prefix)
std::vector< G1_variable< ppT > > computed_results
std::vector< G1_dbl_gadget< ppT > > doublers
G1_dbl_gadget(protoboard< FieldT > &pb, const G1_variable< ppT > &A, const G1_variable< ppT > &result, const std::string &annotation_prefix)
void generate_r1cs_constraints()
const pb_linear_combination< Field > selector
G1_variable< ppT > result
Selector gadget for a variable_or_identity, and a variable.
static size_t __attribute__((noinline)) size_in_bits()