/** @file ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) *****************************************************************************/ #ifndef PUBLIC_PARAMS_HPP_ #define PUBLIC_PARAMS_HPP_ #include namespace libsnark { /* for every curve the user should define corresponding public_params with the following typedefs: Fp_type G1_type G2_type G1_precomp_type G2_precomp_type affine_ate_G1_precomp_type affine_ate_G2_precomp_type Fq_type Fqe_type Fqk_type GT_type one should also define the following static methods: void init_public_params(); GT final_exponentiation(const Fqk &elt); G1_precomp precompute_G1(const G1 &P); G2_precomp precompute_G2(const G2 &Q); Fqk miller_loop(const G1_precomp &prec_P, const G2_precomp &prec_Q); affine_ate_G1_precomp affine_ate_precompute_G1(const G1 &P); affine_ate_G2_precomp affine_ate_precompute_G2(const G2 &Q); Fqk affine_ate_miller_loop(const affine_ate_G1_precomp &prec_P, const affine_ate_G2_precomp &prec_Q); Fqk affine_ate_e_over_e_miller_loop(const affine_ate_G1_precomp &prec_P1, const affine_ate_G2_precomp &prec_Q1, const affine_ate_G1_precomp &prec_P2, const affine_ate_G2_precomp &prec_Q2); Fqk affine_ate_e_times_e_over_e_miller_loop(const affine_ate_G1_precomp &prec_P1, const affine_ate_G2_precomp &prec_Q1, const affine_ate_G1_precomp &prec_P2, const affine_ate_G2_precomp &prec_Q2, const affine_ate_G1_precomp &prec_P3, const affine_ate_G2_precomp &prec_Q3); Fqk double_miller_loop(const G1_precomp &prec_P1, const G2_precomp &prec_Q1, const G1_precomp &prec_P2, const G2_precomp &prec_Q2); Fqk pairing(const G1 &P, const G2 &Q); GT reduced_pairing(const G1 &P, const G2 &Q); GT affine_reduced_pairing(const G1 &P, const G2 &Q); */ template using Fr = typename EC_ppT::Fp_type; template using G1 = typename EC_ppT::G1_type; template using G2 = typename EC_ppT::G2_type; template using G1_precomp = typename EC_ppT::G1_precomp_type; template using G2_precomp = typename EC_ppT::G2_precomp_type; template using affine_ate_G1_precomp = typename EC_ppT::affine_ate_G1_precomp_type; template using affine_ate_G2_precomp = typename EC_ppT::affine_ate_G2_precomp_type; template using Fq = typename EC_ppT::Fq_type; template using Fqe = typename EC_ppT::Fqe_type; template using Fqk = typename EC_ppT::Fqk_type; template using GT = typename EC_ppT::GT_type; template using Fr_vector = std::vector >; template using G1_vector = std::vector >; template using G2_vector = std::vector >; } // libsnark #endif // PUBLIC_PARAMS_HPP_