Clearmatics Libff  0.1
C++ library for Finite Fields and Elliptic Curves
alt_bn128_pairing.hpp
Go to the documentation of this file.
1 
8 #ifndef ALT_BN128_PAIRING_HPP_
9 #define ALT_BN128_PAIRING_HPP_
11 #include <vector>
12 
13 namespace libff
14 {
15 
16 /* final exponentiation */
17 
19 
20 /* ate pairing */
21 
25 
26  bool operator==(const alt_bn128_ate_G1_precomp &other) const;
27  friend std::ostream &operator<<(
28  std::ostream &out, const alt_bn128_ate_G1_precomp &prec_P);
29  friend std::istream &operator>>(
30  std::istream &in, alt_bn128_ate_G1_precomp &prec_P);
31 };
32 
37 
38  bool operator==(const alt_bn128_ate_ell_coeffs &other) const;
39  friend std::ostream &operator<<(
40  std::ostream &out, const alt_bn128_ate_ell_coeffs &dc);
41  friend std::istream &operator>>(
42  std::istream &in, alt_bn128_ate_ell_coeffs &dc);
43 };
44 
48  std::vector<alt_bn128_ate_ell_coeffs> coeffs;
49 
50  bool operator==(const alt_bn128_ate_G2_precomp &other) const;
51  friend std::ostream &operator<<(
52  std::ostream &out, const alt_bn128_ate_G2_precomp &prec_Q);
53  friend std::istream &operator>>(
54  std::istream &in, alt_bn128_ate_G2_precomp &prec_Q);
55 };
56 
59 
61  const alt_bn128_ate_G1_precomp &prec_P,
62  const alt_bn128_ate_G2_precomp &prec_Q);
64  const alt_bn128_ate_G1_precomp &prec_P1,
65  const alt_bn128_ate_G2_precomp &prec_Q1,
66  const alt_bn128_ate_G1_precomp &prec_P2,
67  const alt_bn128_ate_G2_precomp &prec_Q2);
68 
70  const alt_bn128_G1 &P, const alt_bn128_G2 &Q);
72  const alt_bn128_G1 &P, const alt_bn128_G2 &Q);
73 
74 /* choice of pairing */
75 
78 
80 
82 
84  const alt_bn128_G1_precomp &prec_P, const alt_bn128_G2_precomp &prec_Q);
85 
87  const alt_bn128_G1_precomp &prec_P1,
88  const alt_bn128_G2_precomp &prec_Q1,
89  const alt_bn128_G1_precomp &prec_P2,
90  const alt_bn128_G2_precomp &prec_Q2);
91 
93 
95  const alt_bn128_G1 &P, const alt_bn128_G2 &Q);
96 
98  const alt_bn128_G1 &P, const alt_bn128_G2 &Q);
99 
100 } // namespace libff
101 #endif // ALT_BN128_PAIRING_HPP_
libff::alt_bn128_ate_G2_precomp::operator<<
friend std::ostream & operator<<(std::ostream &out, const alt_bn128_ate_G2_precomp &prec_Q)
Definition: alt_bn128_pairing.cpp:75
libff::alt_bn128_ate_G1_precomp::PX
alt_bn128_Fq PX
Definition: alt_bn128_pairing.hpp:23
libff
Definition: ffi.cpp:8
libff::alt_bn128_ate_ell_coeffs
Definition: alt_bn128_pairing.hpp:33
libff::alt_bn128_ate_ell_coeffs::ell_VW
alt_bn128_Fq2 ell_VW
Definition: alt_bn128_pairing.hpp:35
libff::alt_bn128_double_miller_loop
alt_bn128_Fq12 alt_bn128_double_miller_loop(const alt_bn128_G1_precomp &prec_P1, const alt_bn128_G2_precomp &prec_Q1, const alt_bn128_G1_precomp &prec_P2, const alt_bn128_G2_precomp &prec_Q2)
Definition: alt_bn128_pairing.cpp:563
libff::alt_bn128_GT
alt_bn128_Fq12 alt_bn128_GT
Definition: alt_bn128_init.hpp:36
libff::alt_bn128_ate_G1_precomp::PY
alt_bn128_Fq PY
Definition: alt_bn128_pairing.hpp:24
libff::alt_bn128_pairing
alt_bn128_Fq12 alt_bn128_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:572
libff::alt_bn128_ate_G2_precomp::operator==
bool operator==(const alt_bn128_ate_G2_precomp &other) const
Definition: alt_bn128_pairing.cpp:67
libff::alt_bn128_ate_ell_coeffs::operator>>
friend std::istream & operator>>(std::istream &in, alt_bn128_ate_ell_coeffs &dc)
Definition: alt_bn128_pairing.cpp:56
libff::alt_bn128_ate_G2_precomp::QY
alt_bn128_Fq2 QY
Definition: alt_bn128_pairing.hpp:47
libff::alt_bn128_ate_ell_coeffs::ell_0
alt_bn128_Fq2 ell_0
Definition: alt_bn128_pairing.hpp:34
libff::alt_bn128_precompute_G1
alt_bn128_G1_precomp alt_bn128_precompute_G1(const alt_bn128_G1 &P)
Definition: alt_bn128_pairing.cpp:547
libff::alt_bn128_ate_G2_precomp::QX
alt_bn128_Fq2 QX
Definition: alt_bn128_pairing.hpp:46
libff::alt_bn128_ate_G2_precomp::operator>>
friend std::istream & operator>>(std::istream &in, alt_bn128_ate_G2_precomp &prec_Q)
Definition: alt_bn128_pairing.cpp:86
libff::alt_bn128_ate_ell_coeffs::operator<<
friend std::ostream & operator<<(std::ostream &out, const alt_bn128_ate_ell_coeffs &dc)
Definition: alt_bn128_pairing.cpp:49
libff::alt_bn128_ate_double_miller_loop
alt_bn128_Fq12 alt_bn128_ate_double_miller_loop(const alt_bn128_ate_G1_precomp &prec_P1, const alt_bn128_ate_G2_precomp &prec_Q1, const alt_bn128_ate_G1_precomp &prec_P2, const alt_bn128_ate_G2_precomp &prec_Q2)
Definition: alt_bn128_pairing.cpp:453
libff::alt_bn128_ate_G1_precomp::operator>>
friend std::istream & operator>>(std::istream &in, alt_bn128_ate_G1_precomp &prec_P)
Definition: alt_bn128_pairing.cpp:32
alt_bn128_init.hpp
libff::alt_bn128_precompute_G2
alt_bn128_G2_precomp alt_bn128_precompute_G2(const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:552
libff::alt_bn128_reduced_pairing
alt_bn128_GT alt_bn128_reduced_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:577
libff::alt_bn128_G2
Definition: alt_bn128_g2.hpp:21
libff::Fp12_2over3over2_model
Definition: fp12_2over3over2.hpp:20
libff::alt_bn128_G2_precomp
alt_bn128_ate_G2_precomp alt_bn128_G2_precomp
Definition: alt_bn128_pairing.hpp:77
libff::Fp_model< alt_bn128_q_limbs, alt_bn128_modulus_q >
libff::alt_bn128_ate_reduced_pairing
alt_bn128_GT alt_bn128_ate_reduced_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:535
libff::alt_bn128_ate_precompute_G2
alt_bn128_ate_G2_precomp alt_bn128_ate_precompute_G2(const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:340
libff::alt_bn128_G1_precomp
alt_bn128_ate_G1_precomp alt_bn128_G1_precomp
Definition: alt_bn128_pairing.hpp:76
libff::alt_bn128_ate_miller_loop
alt_bn128_Fq12 alt_bn128_ate_miller_loop(const alt_bn128_ate_G1_precomp &prec_P, const alt_bn128_ate_G2_precomp &prec_Q)
Definition: alt_bn128_pairing.cpp:401
libff::alt_bn128_ate_G1_precomp
Definition: alt_bn128_pairing.hpp:22
libff::alt_bn128_ate_ell_coeffs::ell_VV
alt_bn128_Fq2 ell_VV
Definition: alt_bn128_pairing.hpp:36
libff::alt_bn128_ate_G2_precomp::coeffs
std::vector< alt_bn128_ate_ell_coeffs > coeffs
Definition: alt_bn128_pairing.hpp:48
libff::Fp2_model< alt_bn128_q_limbs, alt_bn128_modulus_q >
libff::alt_bn128_G1
Definition: alt_bn128_g1.hpp:21
libff::alt_bn128_ate_pairing
alt_bn128_Fq12 alt_bn128_ate_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
Definition: alt_bn128_pairing.cpp:524
libff::alt_bn128_Fq12
Fp12_2over3over2_model< alt_bn128_q_limbs, alt_bn128_modulus_q > alt_bn128_Fq12
Definition: alt_bn128_init.hpp:35
libff::alt_bn128_ate_G1_precomp::operator==
bool operator==(const alt_bn128_ate_G1_precomp &other) const
Definition: alt_bn128_pairing.cpp:18
libff::alt_bn128_ate_G2_precomp
Definition: alt_bn128_pairing.hpp:45
libff::alt_bn128_ate_precompute_G1
alt_bn128_ate_G1_precomp alt_bn128_ate_precompute_G1(const alt_bn128_G1 &P)
Definition: alt_bn128_pairing.cpp:325
libff::alt_bn128_affine_reduced_pairing
alt_bn128_GT alt_bn128_affine_reduced_pairing(const alt_bn128_G1 &P, const alt_bn128_G2 &Q)
libff::alt_bn128_ate_G1_precomp::operator<<
friend std::ostream & operator<<(std::ostream &out, const alt_bn128_ate_G1_precomp &prec_P)
Definition: alt_bn128_pairing.cpp:24
libff::alt_bn128_miller_loop
alt_bn128_Fq12 alt_bn128_miller_loop(const alt_bn128_G1_precomp &prec_P, const alt_bn128_G2_precomp &prec_Q)
Definition: alt_bn128_pairing.cpp:557
libff::alt_bn128_final_exponentiation
alt_bn128_GT alt_bn128_final_exponentiation(const alt_bn128_Fq12 &elt)
Definition: alt_bn128_pairing.cpp:231
libff::alt_bn128_ate_ell_coeffs::operator==
bool operator==(const alt_bn128_ate_ell_coeffs &other) const
Definition: alt_bn128_pairing.cpp:41