Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
public_params.hpp
Go to the documentation of this file.
1
8#ifndef PUBLIC_PARAMS_HPP_
9#define PUBLIC_PARAMS_HPP_
10#include <vector>
11
12namespace libff {
13
14/*
15 for every curve the user should define corresponding
16 public_params with the following typedefs:
17
18 Fp_type
19 G1_type
20 G2_type
21 G1_precomp_type
22 G2_precomp_type
23 affine_ate_G1_precomp_type
24 affine_ate_G2_precomp_type
25 Fq_type
26 Fqe_type
27 Fqk_type
28 GT_type
29
30 one should also define the following static methods:
31
32 void init_public_params();
33
34 GT<EC_ppT> final_exponentiation(const Fqk<EC_ppT> &elt);
35
36 G1_precomp<EC_ppT> precompute_G1(const G1<EC_ppT> &P);
37 G2_precomp<EC_ppT> precompute_G2(const G2<EC_ppT> &Q);
38
39 Fqk<EC_ppT> miller_loop(const G1_precomp<EC_ppT> &prec_P,
40 const G2_precomp<EC_ppT> &prec_Q);
41
42 affine_ate_G1_precomp<EC_ppT> affine_ate_precompute_G1(const G1<EC_ppT> &P);
43 affine_ate_G2_precomp<EC_ppT> affine_ate_precompute_G2(const G2<EC_ppT> &Q);
44
45
46 Fqk<EC_ppT> affine_ate_miller_loop(const affine_ate_G1_precomp<EC_ppT> &prec_P,
47 const affine_ate_G2_precomp<EC_ppT> &prec_Q);
48 Fqk<EC_ppT> affine_ate_e_over_e_miller_loop(const affine_ate_G1_precomp<EC_ppT> &prec_P1,
49 const affine_ate_G2_precomp<EC_ppT> &prec_Q1,
50 const affine_ate_G1_precomp<EC_ppT> &prec_P2,
51 const affine_ate_G2_precomp<EC_ppT> &prec_Q2);
52 Fqk<EC_ppT> affine_ate_e_times_e_over_e_miller_loop(const affine_ate_G1_precomp<EC_ppT> &prec_P1,
53 const affine_ate_G2_precomp<EC_ppT> &prec_Q1,
54 const affine_ate_G1_precomp<EC_ppT> &prec_P2,
55 const affine_ate_G2_precomp<EC_ppT> &prec_Q2,
56 const affine_ate_G1_precomp<EC_ppT> &prec_P3,
57 const affine_ate_G2_precomp<EC_ppT> &prec_Q3);
58 Fqk<EC_ppT> double_miller_loop(const G1_precomp<EC_ppT> &prec_P1,
59 const G2_precomp<EC_ppT> &prec_Q1,
60 const G1_precomp<EC_ppT> &prec_P2,
61 const G2_precomp<EC_ppT> &prec_Q2);
62
63 Fqk<EC_ppT> pairing(const G1<EC_ppT> &P,
64 const G2<EC_ppT> &Q);
65 GT<EC_ppT> reduced_pairing(const G1<EC_ppT> &P,
66 const G2<EC_ppT> &Q);
67 GT<EC_ppT> affine_reduced_pairing(const G1<EC_ppT> &P,
68 const G2<EC_ppT> &Q);
69*/
70
71template<typename EC_ppT>
72using Fr = typename EC_ppT::Fp_type;
73template<typename EC_ppT>
74using G1 = typename EC_ppT::G1_type;
75template<typename EC_ppT>
76using G2 = typename EC_ppT::G2_type;
77template<typename EC_ppT>
78using G1_precomp = typename EC_ppT::G1_precomp_type;
79template<typename EC_ppT>
80using G2_precomp = typename EC_ppT::G2_precomp_type;
81template<typename EC_ppT>
82using affine_ate_G1_precomp = typename EC_ppT::affine_ate_G1_precomp_type;
83template<typename EC_ppT>
84using affine_ate_G2_precomp = typename EC_ppT::affine_ate_G2_precomp_type;
85template<typename EC_ppT>
86using Fq = typename EC_ppT::Fq_type;
87template<typename EC_ppT>
88using Fqe = typename EC_ppT::Fqe_type;
89template<typename EC_ppT>
90using Fqk = typename EC_ppT::Fqk_type;
91template<typename EC_ppT>
92using GT = typename EC_ppT::GT_type;
93
94template<typename EC_ppT>
95using Fr_vector = std::vector<Fr<EC_ppT> >;
96template<typename EC_ppT>
97using G1_vector = std::vector<G1<EC_ppT> >;
98template<typename EC_ppT>
99using G2_vector = std::vector<G2<EC_ppT> >;
100
101} // libff
102
103#endif // PUBLIC_PARAMS_HPP_
typename EC_ppT::Fqe_type Fqe
typename EC_ppT::Fq_type Fq
typename EC_ppT::affine_ate_G1_precomp_type affine_ate_G1_precomp
typename EC_ppT::Fqk_type Fqk
typename EC_ppT::G1_precomp_type G1_precomp
typename EC_ppT::G1_type G1
std::vector< G1< EC_ppT > > G1_vector
typename EC_ppT::Fp_type Fr
typename EC_ppT::affine_ate_G2_precomp_type affine_ate_G2_precomp
typename EC_ppT::GT_type GT
typename EC_ppT::G2_precomp_type G2_precomp
std::vector< Fr< EC_ppT > > Fr_vector
std::vector< G2< EC_ppT > > G2_vector