Clearmatics Libff  0.1
C++ library for Finite Fields and Elliptic Curves
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
libff::bn128_pp Class Reference

#include <bn128_pp.hpp>

Public Types

typedef bn128_Fr Fp_type
 
typedef bn128_G1 G1_type
 
typedef bn128_G2 G2_type
 
typedef bn128_ate_G1_precomp G1_precomp_type
 
typedef bn128_ate_G2_precomp G2_precomp_type
 
typedef bn128_Fq Fq_type
 
typedef bn128_Fq12 Fqk_type
 
typedef bn128_GT GT_type
 

Static Public Member Functions

static void init_public_params ()
 
static bn128_GT final_exponentiation (const bn128_Fq12 &elt)
 
static bn128_ate_G1_precomp precompute_G1 (const bn128_G1 &P)
 
static bn128_ate_G2_precomp precompute_G2 (const bn128_G2 &Q)
 
static bn128_Fq12 miller_loop (const bn128_ate_G1_precomp &prec_P, const bn128_ate_G2_precomp &prec_Q)
 
static bn128_Fq12 double_miller_loop (const bn128_ate_G1_precomp &prec_P1, const bn128_ate_G2_precomp &prec_Q1, const bn128_ate_G1_precomp &prec_P2, const bn128_ate_G2_precomp &prec_Q2)
 
static bn128_GT pairing (const bn128_G1 &P, const bn128_G2 &Q)
 
static bn128_GT reduced_pairing (const bn128_G1 &P, const bn128_G2 &Q)
 

Static Public Attributes

static const std::string name
 
static const bool has_affine_pairing = false
 

Detailed Description

Definition at line 20 of file bn128_pp.hpp.

Member Typedef Documentation

◆ Fp_type

Definition at line 25 of file bn128_pp.hpp.

◆ Fq_type

Definition at line 30 of file bn128_pp.hpp.

◆ Fqk_type

Definition at line 31 of file bn128_pp.hpp.

◆ G1_precomp_type

Definition at line 28 of file bn128_pp.hpp.

◆ G1_type

Definition at line 26 of file bn128_pp.hpp.

◆ G2_precomp_type

Definition at line 29 of file bn128_pp.hpp.

◆ G2_type

Definition at line 27 of file bn128_pp.hpp.

◆ GT_type

Definition at line 32 of file bn128_pp.hpp.

Member Function Documentation

◆ double_miller_loop()

bn128_Fq12 libff::bn128_pp::double_miller_loop ( const bn128_ate_G1_precomp prec_P1,
const bn128_ate_G2_precomp prec_Q1,
const bn128_ate_G1_precomp prec_P2,
const bn128_ate_G2_precomp prec_Q2 
)
static

Definition at line 42 of file bn128_pp.cpp.

47 {
48  enter_block("Call to double_miller_loop<bn128_pp>");
49  bn128_Fq12 result =
50  bn128_double_ate_miller_loop(prec_P1, prec_Q1, prec_P2, prec_Q2);
51  leave_block("Call to double_miller_loop<bn128_pp>");
52  return result;
53 }
Here is the call graph for this function:

◆ final_exponentiation()

bn128_GT libff::bn128_pp::final_exponentiation ( const bn128_Fq12 elt)
static

Definition at line 18 of file bn128_pp.cpp.

19 {
20  return bn128_final_exponentiation(elt);
21 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_public_params()

void libff::bn128_pp::init_public_params ( )
static

Definition at line 16 of file bn128_pp.cpp.

16 { init_bn128_params(); }
Here is the call graph for this function:

◆ miller_loop()

bn128_Fq12 libff::bn128_pp::miller_loop ( const bn128_ate_G1_precomp prec_P,
const bn128_ate_G2_precomp prec_Q 
)
static

Definition at line 33 of file bn128_pp.cpp.

35 {
36  enter_block("Call to miller_loop<bn128_pp>");
37  bn128_Fq12 result = bn128_ate_miller_loop(prec_P, prec_Q);
38  leave_block("Call to miller_loop<bn128_pp>");
39  return result;
40 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pairing()

bn128_Fq12 libff::bn128_pp::pairing ( const bn128_G1 P,
const bn128_G2 Q 
)
static

Definition at line 55 of file bn128_pp.cpp.

56 {
57  enter_block("Call to pairing<bn128_pp>");
58  bn128_ate_G1_precomp prec_P = bn128_pp::precompute_G1(P);
59  bn128_ate_G2_precomp prec_Q = bn128_pp::precompute_G2(Q);
60 
61  bn128_Fq12 result = bn128_pp::miller_loop(prec_P, prec_Q);
62  leave_block("Call to pairing<bn128_pp>");
63  return result;
64 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ precompute_G1()

bn128_ate_G1_precomp libff::bn128_pp::precompute_G1 ( const bn128_G1 P)
static

Definition at line 23 of file bn128_pp.cpp.

24 {
25  return bn128_ate_precompute_G1(P);
26 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ precompute_G2()

bn128_ate_G2_precomp libff::bn128_pp::precompute_G2 ( const bn128_G2 Q)
static

Definition at line 28 of file bn128_pp.cpp.

29 {
30  return bn128_ate_precompute_G2(Q);
31 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduced_pairing()

bn128_GT libff::bn128_pp::reduced_pairing ( const bn128_G1 P,
const bn128_G2 Q 
)
static

Definition at line 66 of file bn128_pp.cpp.

67 {
68  enter_block("Call to reduced_pairing<bn128_pp>");
69  const bn128_Fq12 f = bn128_pp::pairing(P, Q);
70  const bn128_GT result = bn128_pp::final_exponentiation(f);
71  leave_block("Call to reduced_pairing<bn128_pp>");
72  return result;
73 }
Here is the call graph for this function:

Member Data Documentation

◆ has_affine_pairing

const bool libff::bn128_pp::has_affine_pairing = false
static

Definition at line 34 of file bn128_pp.hpp.

◆ name

const std::string libff::bn128_pp::name
static

Definition at line 23 of file bn128_pp.hpp.


The documentation for this class was generated from the following files:
libff::enter_block
void enter_block(const std::string &msg, const bool indent)
Definition: profiling.cpp:271
libff::bn128_pp::precompute_G2
static bn128_ate_G2_precomp precompute_G2(const bn128_G2 &Q)
Definition: bn128_pp.cpp:28
libff::bn128_pp::miller_loop
static bn128_Fq12 miller_loop(const bn128_ate_G1_precomp &prec_P, const bn128_ate_G2_precomp &prec_Q)
Definition: bn128_pp.cpp:33
libff::bn128_pp::final_exponentiation
static bn128_GT final_exponentiation(const bn128_Fq12 &elt)
Definition: bn128_pp.cpp:18
libff::bn128_ate_precompute_G1
bn128_ate_G1_precomp bn128_ate_precompute_G1(const bn128_G1 &P)
Definition: bn128_pairing.cpp:166
libff::bn128_ate_precompute_G2
bn128_ate_G2_precomp bn128_ate_precompute_G2(const bn128_G2 &Q)
Definition: bn128_pairing.cpp:179
libff::bn128_final_exponentiation
bn128_GT bn128_final_exponentiation(const bn128_Fq12 &elt)
Definition: bn128_pairing.cpp:212
libff::bn128_double_ate_miller_loop
bn128_Fq12 bn128_double_ate_miller_loop(const bn128_ate_G1_precomp &prec_P1, const bn128_ate_G2_precomp &prec_Q1, const bn128_ate_G1_precomp &prec_P2, const bn128_ate_G2_precomp &prec_Q2)
Definition: bn128_pairing.cpp:200
libff::init_bn128_params
void init_bn128_params()
Definition: bn128_init.cpp:29
libff::leave_block
void leave_block(const std::string &msg, const bool indent)
Definition: profiling.cpp:305
libff::bn128_ate_miller_loop
bn128_Fq12 bn128_ate_miller_loop(const bn128_ate_G1_precomp &prec_P, const bn128_ate_G2_precomp &prec_Q)
Definition: bn128_pairing.cpp:192
libff::bn128_pp::pairing
static bn128_GT pairing(const bn128_G1 &P, const bn128_G2 &Q)
Definition: bn128_pp.cpp:55
libff::bn128_Fq12
bn128_GT bn128_Fq12
Definition: bn128_init.hpp:46
libff::bn128_pp::precompute_G1
static bn128_ate_G1_precomp precompute_G1(const bn128_G1 &P)
Definition: bn128_pp.cpp:23