Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
15 #ifndef FP3_GADGETS_HPP_
16 #define FP3_GADGETS_HPP_
73 template<
typename Fp3T>
100 template<
typename Fp3T>
123 template<
typename Fp3T>
132 std::shared_ptr<Fp3_mul_gadget<Fp3T>>
mul;
147 #endif // FP3_GADGETS_HPP_
pb_linear_combination< FieldT > c1
void generate_r1cs_constraints()
Fp3_mul_by_lc_gadget(protoboard< FieldT > &pb, const Fp3_variable< Fp3T > &A, const pb_linear_combination< FieldT > &lc, const Fp3_variable< Fp3T > &result, const std::string &annotation_prefix)
pb_linear_combination< FieldT > lc
Fp3_variable< Fp3T > result
const std::string annotation_prefix
std::shared_ptr< Fp3_mul_gadget< Fp3T > > mul
Fp3_variable< Fp3T > operator*(const FieldT &coeff) const
void generate_r1cs_witness(const Fp3T &el)
static size_t num_variables()
protoboard< Fp3T::my_Fp > & pb
Fp3_variable< Fp3T > mul_by_X() const
void generate_r1cs_constraints()
void generate_r1cs_witness()
Fp3_variable(protoboard< FieldT > &pb, const std::string &annotation_prefix)
void generate_r1cs_witness()
Fp3_variable< Fp3T > result
Fp3_sqr_gadget(protoboard< FieldT > &pb, const Fp3_variable< Fp3T > &A, const Fp3_variable< Fp3T > &result, const std::string &annotation_prefix)
Fp3_variable< Fp3T > operator+(const Fp3_variable< Fp3T > &other) const
pb_linear_combination< FieldT > c2
Fp3_mul_gadget(protoboard< FieldT > &pb, const Fp3_variable< Fp3T > &A, const Fp3_variable< Fp3T > &B, const Fp3_variable< Fp3T > &result, const std::string &annotation_prefix)
Fp3_variable< Fp3T > result
void generate_r1cs_constraints()
void generate_r1cs_witness()
void generate_r1cs_equals_const_constraints(const Fp3T &el)
pb_linear_combination_array< FieldT > all_vars
pb_linear_combination< FieldT > c0
static size_t size_in_bits()