Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
15 #ifndef FP2_GADGETS_HPP_
16 #define FP2_GADGETS_HPP_
75 template<
typename Fp2T>
101 template<
typename Fp2T>
124 template<
typename Fp2T>
146 #endif // FP2_GADGETS_HPP_
Fp2_mul_gadget(protoboard< FieldT > &pb, const Fp2_variable< Fp2T > &A, const Fp2_variable< Fp2T > &B, const Fp2_variable< Fp2T > &result, const std::string &annotation_prefix)
Fp2_variable< Fp2T > mul_by_X() const
pb_linear_combination_array< FieldT > all_vars
const std::string annotation_prefix
Fp2_variable< Fp2T > result
protoboard< Fp2T::my_Fp > & pb
Fp2_mul_by_lc_gadget(protoboard< FieldT > &pb, const Fp2_variable< Fp2T > &A, const pb_linear_combination< FieldT > &lc, const Fp2_variable< Fp2T > &result, const std::string &annotation_prefix)
void generate_r1cs_constraints()
pb_linear_combination< FieldT > c0
Fp2_variable< Fp2T > frobenius_map(size_t power) const
void generate_r1cs_witness()
Fp2_variable(protoboard< FieldT > &pb, const std::string &annotation_prefix)
pb_linear_combination< FieldT > c1
FElem power(const FElem &base, long exponent)
void generate_r1cs_witness()
void generate_r1cs_constraints()
pb_linear_combination< FieldT > lc
Fp2_variable< Fp2T > operator*(const FieldT &coeff) const
void generate_r1cs_equals_const_constraints(const Fp2T &el)
static size_t num_variables()
void generate_r1cs_constraints()
void generate_r1cs_witness(const Fp2T &el)
Fp2_variable< Fp2T > operator-() const
Fp2_variable< Fp2T > result
Fp2_variable< Fp2T > result
static size_t size_in_bits()
Fp2_variable< Fp2T > operator+(const Fp2_variable< Fp2T > &other) const
Fp2_sqr_gadget(protoboard< FieldT > &pb, const Fp2_variable< Fp2T > &A, const Fp2_variable< Fp2T > &result, const std::string &annotation_prefix)
void generate_r1cs_witness()