Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
15 #ifndef FP4_GADGETS_HPP_
16 #define FP4_GADGETS_HPP_
31 typedef typename Fp4T::my_Fpe
Fp2T;
57 template<
typename Fp4T>
62 typedef typename Fp4T::my_Fpe
Fp2T;
75 std::shared_ptr<Fp2_variable<Fp2T>>
v0;
76 std::shared_ptr<Fp2_variable<Fp2T>>
v1;
104 template<
typename Fp4T>
109 typedef typename Fp4T::my_Fpe
Fp2T;
137 template<
typename Fp4T>
142 typedef typename Fp4T::my_Fpe
Fp2T;
147 std::shared_ptr<Fp2_variable<Fp2T>>
v1;
151 std::shared_ptr<Fp2_variable<Fp2T>>
v0;
179 template<
typename Fp4T>
186 typedef typename Fp4T::my_Fpe
Fp2T;
218 #endif // FP4_GADGETS_HPP_
std::shared_ptr< Fp2_sqr_gadget< Fp2T > > compute_v1
std::shared_ptr< Fp2_variable< Fp2T > > Ac0_plus_Ac1
void generate_r1cs_witness()
std::shared_ptr< Fp2_sqr_gadget< Fp2T > > compute_result_c1
pb_linear_combination< FieldT > c1_expr_c0
Fp4_cyclotomic_sqr_gadget(protoboard< FieldT > &pb, const Fp4_variable< Fp4T > &A, const Fp4_variable< Fp4T > &result, const std::string &annotation_prefix)
std::shared_ptr< Fp2_mul_gadget< Fp2T > > compute_result_c1
const std::string annotation_prefix
void generate_r1cs_witness(const Fp4T &el)
pb_linear_combination< FieldT > Ac0_plus_Ac1_c0
pb_linear_combination< FieldT > v0_c1
void generate_r1cs_witness()
std::shared_ptr< Fp2_variable< Fp2T > > A_c0_plus_A_c1
std::shared_ptr< Fp2_variable< Fp2T > > c0_expr
protoboard< Fp4T::my_Fp > & pb
pb_linear_combination< FieldT > c0_expr_c0
void generate_r1cs_constraints()
Fp4_direct_mul_gadget(protoboard< FieldT > &pb, const Fp4_variable< Fp4T > &A, const Fp4_variable< Fp4T > &B, const Fp4_variable< Fp4T > &result, const std::string &annotation_prefix)
std::shared_ptr< Fp2_variable< Fp2T > > result_c1_plus_v0_plus_v1
pb_linear_combination< FieldT > Bc0_plus_Bc1_c1
Fp4_variable< Fp4T > result
std::shared_ptr< Fp2_variable< Fp2T > > v1
pb_linear_combination< FieldT > Bc0_plus_Bc1_c0
pb_linear_combination< FieldT > Ac0_plus_Ac1_c0
pb_linear_combination< FieldT > result_c1_plus_v0_plus_v1_c1
std::shared_ptr< Fp2_variable< Fp2T > > c1_expr
std::shared_ptr< Fp2_variable< Fp2T > > Bc0_plus_Bc1
Fp4_variable(protoboard< FieldT > &pb, const std::string &annotation_prefix)
pb_linear_combination< FieldT > A_c0_plus_A_c1_c0
Fp4_variable< Fp4T > result
void generate_r1cs_witness()
void generate_r1cs_constraints()
void generate_r1cs_equals_const_constraints(const Fp4T &el)
pb_linear_combination< FieldT > result_c1_plus_v0_plus_v1_c0
FElem power(const FElem &base, long exponent)
void generate_r1cs_constraints()
std::shared_ptr< Fp2_sqr_gadget< Fp2T > > compute_v0
std::shared_ptr< Fp2_sqr_gadget< Fp2T > > compute_c1_expr
void generate_r1cs_witness()
std::shared_ptr< Fp2_mul_gadget< Fp2T > > compute_v1
Fp4_sqr_gadget(protoboard< FieldT > &pb, const Fp4_variable< Fp4T > &A, const Fp4_variable< Fp4T > &result, const std::string &annotation_prefix)
std::shared_ptr< Fp2_sqr_gadget< Fp2T > > compute_c0_expr
pb_linear_combination< FieldT > c0_expr_c1
pb_linear_combination< FieldT > Ac0_plus_Ac1_c1
pb_linear_combination< FieldT > result_c1_plus_v0_plus_v1_c0
std::shared_ptr< Fp2_variable< Fp2T > > v0
pb_linear_combination< FieldT > A_c0_plus_A_c1_c1
Fp4_variable< Fp4T > result
std::shared_ptr< Fp2_variable< Fp2T > > result_c1_plus_v0_plus_v1
pb_linear_combination< FieldT > result_c1_plus_v0_plus_v1_c1
std::shared_ptr< Fp2_mul_gadget< Fp2T > > compute_v0
Fp4_variable< Fp4T > result
pb_linear_combination< FieldT > v0_c0
pb_linear_combination< FieldT > v0_c0
std::shared_ptr< Fp2_variable< Fp2T > > v0
Fp4_tower_mul_gadget(protoboard< FieldT > &pb, const Fp4_variable< Fp4T > &A, const Fp4_variable< Fp4T > &B, const Fp4_variable< Fp4T > &result, const std::string &annotation_prefix)
std::shared_ptr< Fp2_variable< Fp2T > > Ac0_plus_Ac1
pb_linear_combination< FieldT > v0_c1
pb_linear_combination< FieldT > Ac0_plus_Ac1_c1
pb_linear_combination< FieldT > c1_expr_c1
Fp4_variable< Fp4T > Frobenius_map(const size_t power) const
void generate_r1cs_constraints()
std::shared_ptr< Fp2_variable< Fp2T > > v1