Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
Go to the documentation of this file.
15 #ifndef LIBSNARK_GADGETLIB1_GADGETS_FIELDS_FP12_2OVER3OVER2_GADGETS_HPP_
16 #define LIBSNARK_GADGETLIB1_GADGETS_FIELDS_FP12_2OVER3OVER2_GADGETS_HPP_
23 template<
typename Fp12T>
27 using FieldT =
typename Fp12T::my_Fp;
28 using Fp6T =
typename Fp12T::my_Fp6;
29 using Fp2T =
typename Fp12T::my_Fp2;
64 template<
typename Fp12T>
68 const std::string &annotation_prefix);
74 template<
typename Fp12T>
78 const std::string &annotation_prefix);
91 template<
typename Fp12T>
95 using FieldT =
typename Fp12T::my_Fp;
96 using Fp6T =
typename Fp12T::my_Fp6;
130 template<
typename Fp12T>
135 using Fp6T =
typename Fp12T::my_Fp6;
136 using Fp2T =
typename Fp12T::my_Fp2;
189 template<
typename Fp12T>
194 using Fp6T =
typename Fp12T::my_Fp6;
215 template<
typename Fp12T>
220 using Fp2T =
typename Fp12T::my_Fp2;
221 using Fp6T =
typename Fp12T::my_Fp6;
237 template<
typename Fp12T>
239 :
public gadget<typename Fp12T::my_Fp>
243 using Fp2T =
typename Fp12T::my_Fp2;
244 using Fp6T =
typename Fp12T::my_Fp6;
304 #endif // LIBSNARK_GADGETLIB1_GADGETS_FIELDS_FP12_2OVER3OVER2_GADGETS_HPP_
Fp2_mul_gadget< Fp2T > _compute_z4_x4
Fp2_variable< Fp2T > _X_0
Fp6_3over2_mul_gadget< Fp6T > _compute_v0
Fp12_2over3over2_mul_gadget< Fp12T > _compute_A_times_result
const std::string annotation_prefix
Fp2_variable< Fp2T > _X_2
void generate_r1cs_witness()
void generate_r1cs_witness()
Fp12_2over3over2_variable< Fp12T > _A
Fp6_3over2_variable< typename Fp12T::my_Fp6 > fp6_mul_by_non_residue_inverse(protoboard< typename Fp12T::my_Fp > &pb, const Fp6_3over2_variable< typename Fp12T::my_Fp6 > &c, const std::string &annotation_prefix)
void generate_r1cs_constraints()
const Fp12_2over3over2_variable< Fp12T > & result() const
Fp6_3over2_mul_gadget< Fp6T > _compute_a0_plus_a1_times_b0_plus_b1
protoboard< Fp12T::my_Fp > & pb
void generate_r1cs_constraints()
void generate_r1cs_witness(const Fp12T &el)
Fp6_3over2_variable< typename Fp12T::my_Fp6 > fp6_mul_by_non_residue(protoboard< typename Fp12T::my_Fp > &pb, const Fp6_3over2_variable< typename Fp12T::my_Fp6 > &c, const std::string &annotation_prefix)
Fp2_mul_gadget< Fp2T > _compute_z1z5
typename FqkT ::my_Fp FieldT
Fp2_mul_gadget< Fp2T > _check_result_1
Fp6_3over2_mul_gadget< Fp6T > _compute_alpha
Fp12_2over3over2_variable< Fp12T > _result
Fp12_2over3over2_variable< Fp12T > _result
Fp12_2over3over2_variable(protoboard< FieldT > &pb, const std::string &annotation_prefix)
Fp2_mul_gadget< Fp2T > _compute_z1_x0
void generate_r1cs_witness()
const Fp12_2over3over2_variable< Fp12T > & result() const
Fp12_2over3over2_variable< Fp12T > _result
Fp12_2over3over2_variable< Fp12T > operator*(const Fp2T &fp2_const) const
const Fp12_2over3over2_variable< Fp12T > & result() const
Fp2_variable< Fp2T > _X_4
Fp12_2over3over2_variable< Fp12T > _A
void generate_r1cs_witness()
Fp2_mul_gadget< Fp2T > _compute_z1_x2
Fp2_mul_gadget< Fp2T > _compute_z3z2
typename FqkT ::my_Fp FieldT
Fp2_mul_gadget< Fp2T > _compute_z24_x24
const Fp12_2over3over2_variable< Fp12T > & result() const
Fp12_2over3over2_variable< Fp12T > _result
Fp12_2over3over2_variable< Fp12T > _result
typename FqkT ::my_Fp6 Fp6T
Fp2_mul_gadget< Fp2T > _compute_z0z4
typename FqkT ::my_Fp FieldT
Fp12T get_element() const
typename FqkT ::my_Fp FieldT
void generate_r1cs_constraints()
Fp6_3over2_variable< Fp6T > _c0
typename FqkT ::my_Fp2 Fp2T
Fp2_mul_gadget< Fp2T > _compute_z3_x4
Fp12_2over3over2_inv_gadget(protoboard< FieldT > &pb, const Fp12_2over3over2_variable< Fp12T > &A, const Fp12_2over3over2_variable< Fp12T > &result, const std::string &annotation_prefix)
typename FqkT ::my_Fp2 Fp2T
Fp12_2over3over2_variable< Fp12T > _A
Fp2_mul_gadget< Fp2T > _compute_z5_x4
FElem power(const FElem &base, long exponent)
typename FqkT ::my_Fp2 Fp2T
const Fp12_2over3over2_variable< Fp12T > & result() const
Fp6_3over2_mul_gadget< Fp6T > _compute_beta
typename FqkT ::my_Fp2 Fp2T
typename FqkT ::my_Fp6 Fp6T
Fp2_mul_gadget< Fp2T > _compute_z2_x2
Fp2_mul_gadget< Fp2T > _compute_z3_x0
void generate_r1cs_constraints()
Fp2_mul_gadget< Fp2T > _check_result_2
Fp2_mul_gadget< Fp2T > _compute_z02_x02
Fp12_2over3over2_mul_gadget(protoboard< FieldT > &pb, const Fp12_2over3over2_variable< Fp12T > &A, const Fp12_2over3over2_variable< Fp12T > &B, const Fp12_2over3over2_variable< Fp12T > &result, const std::string &annotation_prefix)
Fp2_mul_gadget< Fp2T > _compute_z0_x0
Fp2_mul_gadget< Fp2T > _check_result_0
Full multiplication of Fp12 variables.
Fp12_2over3over2_variable< Fp12T > _A
Fp2_mul_gadget< Fp2T > _compute_z04_x04
Fp2_mul_gadget< Fp2T > _compute_z5_x2
void generate_r1cs_witness()
Fp6_3over2_mul_gadget< Fp6T > _compute_v1
typename FqkT ::my_Fp6 Fp6T
Fp12_2over3over2_square_gadget(protoboard< FieldT > &pb, const Fp12_2over3over2_variable< Fp12T > &A, const Fp12_2over3over2_variable< Fp12T > &result, const std::string &annotation_prefix)
void generate_r1cs_constraints()
Fp12_2over3over2_variable< Fp12T > unitary_inverse() const
Fp12_2over3over2_cyclotomic_square_gadget(protoboard< FieldT > &pb, const Fp12_2over3over2_variable< Fp12T > &A, const Fp12_2over3over2_variable< Fp12T > &result, const std::string &annotation_prefix)
typename FqkT ::my_Fp6 Fp6T
Fp12_2over3over2_variable< Fp12T > _B
Fp12_2over3over2_variable< Fp12T > frobenius_map(size_t power) const
Fp6_3over2_variable< Fp6T > _c1
Fp12_2over3over2_mul_by_024_gadget(protoboard< FieldT > &pb, const Fp12_2over3over2_variable< Fp12T > &A, const Fp2_variable< Fp2T > &B_ell_0, const Fp2_variable< Fp2T > &B_ell_vv, const Fp2_variable< Fp2T > &B_ell_vw, const Fp12_2over3over2_variable< Fp12T > &result, const std::string &annotation_prefix)
Inverse of Fp12 variable.
typename FqkT ::my_Fp6 Fp6T
Fp12_2over3over2_variable< Fp12T > _Z
typename FqkT ::my_Fp6 Fp6T
typename FqkT ::my_Fp FieldT
Fp2_mul_gadget< Fp2T > _compute_out_z5_plus_S
typename FqkT ::my_Fp FieldT