Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::pairing Namespace Reference

Classes

struct  miller_lines
 

Functions

constexpr void doubling_step_for_flipped_miller_loop (g2::element &current, fq12::ell_coeffs &ell)
 
constexpr void mixed_addition_step_for_flipped_miller_loop (const g2::element &base, g2::element &Q, fq12::ell_coeffs &line)
 
constexpr void precompute_miller_lines (const g2::element &Q, miller_lines &lines)
 
constexpr fq12 miller_loop (const g1::element &P, const miller_lines &lines)
 
constexpr fq12 miller_loop_batch (const g1::element *points, const miller_lines *lines, size_t num_pairs)
 
constexpr void final_exponentiation_easy_part (const fq12 &elt, fq12 &r)
 
constexpr void final_exponentiation_exp_by_neg_z (const fq12 &elt, fq12 &r)
 
constexpr void final_exponentiation_tricky_part (const fq12 &elt, fq12 &r)
 
constexpr fq12 reduced_ate_pairing (const g1::affine_element &P_affine, const g2::affine_element &Q_affine)
 
fq12 reduced_ate_pairing_batch (const g1::affine_element *P_affines, const g2::affine_element *Q_affines, size_t num_points)
 
fq12 reduced_ate_pairing_batch_precomputed (const g1::affine_element *P_affines, const miller_lines *lines, size_t num_points)
 
constexpr g2::element mul_by_q (const g2::element &a)
 
constexpr fq12 miller_loop (g1::element &P, miller_lines &lines)
 
constexpr fq12 final_exponentiation_easy_part (const fq12 &elt)
 
constexpr fq12 final_exponentiation_exp_by_neg_z (const fq12 &elt)
 
constexpr fq12 final_exponentiation_tricky_part (const fq12 &elt)
 

Variables

constexpr size_t loop_length = 64
 
constexpr size_t neg_z_loop_length = 62
 
constexpr size_t precomputed_coefficients_length = 87
 
constexpr std::array< uint8_t, loop_lengthloop_bits
 
constexpr std::array< bool, neg_z_loop_lengthneg_z_loop_bits
 
constexpr fq two_inv = fq(2).invert()
 

Function Documentation

◆ doubling_step_for_flipped_miller_loop()

constexpr void bb::pairing::doubling_step_for_flipped_miller_loop ( g2::element current,
fq12::ell_coeffs ell 
)
constexpr

Definition at line 27 of file pairing_impl.hpp.

◆ final_exponentiation_easy_part() [1/2]

constexpr fq12 bb::pairing::final_exponentiation_easy_part ( const fq12 elt)
constexpr

Definition at line 216 of file pairing_impl.hpp.

◆ final_exponentiation_easy_part() [2/2]

constexpr void bb::pairing::final_exponentiation_easy_part ( const fq12 elt,
fq12 r 
)
constexpr

◆ final_exponentiation_exp_by_neg_z() [1/2]

constexpr fq12 bb::pairing::final_exponentiation_exp_by_neg_z ( const fq12 elt)
constexpr

Definition at line 223 of file pairing_impl.hpp.

◆ final_exponentiation_exp_by_neg_z() [2/2]

constexpr void bb::pairing::final_exponentiation_exp_by_neg_z ( const fq12 elt,
fq12 r 
)
constexpr

◆ final_exponentiation_tricky_part() [1/2]

constexpr fq12 bb::pairing::final_exponentiation_tricky_part ( const fq12 elt)
constexpr

Definition at line 236 of file pairing_impl.hpp.

◆ final_exponentiation_tricky_part() [2/2]

constexpr void bb::pairing::final_exponentiation_tricky_part ( const fq12 elt,
fq12 r 
)
constexpr

◆ miller_loop() [1/2]

constexpr fq12 bb::pairing::miller_loop ( const g1::element P,
const miller_lines lines 
)
constexpr

◆ miller_loop() [2/2]

constexpr fq12 bb::pairing::miller_loop ( g1::element P,
miller_lines lines 
)
constexpr

Definition at line 134 of file pairing_impl.hpp.

◆ miller_loop_batch()

constexpr fq12 bb::pairing::miller_loop_batch ( const g1::element points,
const miller_lines lines,
size_t  num_pairs 
)
constexpr

Definition at line 172 of file pairing_impl.hpp.

◆ mixed_addition_step_for_flipped_miller_loop()

constexpr void bb::pairing::mixed_addition_step_for_flipped_miller_loop ( const g2::element base,
g2::element Q,
fq12::ell_coeffs line 
)
constexpr

Definition at line 66 of file pairing_impl.hpp.

◆ mul_by_q()

constexpr g2::element bb::pairing::mul_by_q ( const g2::element a)
inlineconstexpr

Definition at line 16 of file pairing_impl.hpp.

◆ precompute_miller_lines()

constexpr void bb::pairing::precompute_miller_lines ( const g2::element Q,
miller_lines lines 
)
constexpr

Definition at line 103 of file pairing_impl.hpp.

◆ reduced_ate_pairing()

constexpr fq12 bb::pairing::reduced_ate_pairing ( const g1::affine_element P_affine,
const g2::affine_element Q_affine 
)
constexpr

Definition at line 263 of file pairing_impl.hpp.

◆ reduced_ate_pairing_batch()

fq12 bb::pairing::reduced_ate_pairing_batch ( const g1::affine_element P_affines,
const g2::affine_element Q_affines,
size_t  num_points 
)
inline

Definition at line 296 of file pairing_impl.hpp.

◆ reduced_ate_pairing_batch_precomputed()

fq12 bb::pairing::reduced_ate_pairing_batch_precomputed ( const g1::affine_element P_affines,
const miller_lines lines,
size_t  num_points 
)
inline

Definition at line 282 of file pairing_impl.hpp.

Variable Documentation

◆ loop_bits

constexpr std::array<uint8_t, loop_length> bb::pairing::loop_bits
constexpr
Initial value:
{ 1, 0, 1, 0, 0, 0, 3, 0, 3, 0, 0, 0, 3, 0, 1, 0, 3, 0, 0, 3, 0, 0,
0, 0, 0, 1, 0, 0, 3, 0, 1, 0, 0, 3, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0,
3, 0, 3, 0, 0, 1, 0, 0, 0, 3, 0, 0, 3, 0, 1, 0, 1, 0, 0, 0 }

Definition at line 22 of file pairing.hpp.

◆ loop_length

constexpr size_t bb::pairing::loop_length = 64
constexpr

Definition at line 18 of file pairing.hpp.

◆ neg_z_loop_bits

constexpr std::array<bool, neg_z_loop_length> bb::pairing::neg_z_loop_bits
constexpr
Initial value:
{
false, false, false, true, false, false, true, true, true, false, true, false, false, true, true, false,
false, true, false, false, true, false, true, false, true, true, false, true, false, false, false, true,
false, false, true, false, true, false, false, true, true, false, true, false, false, true, false, false,
false, false, true, false, false, true, true, true, true, true, false, false, false, true
}

Definition at line 26 of file pairing.hpp.

◆ neg_z_loop_length

constexpr size_t bb::pairing::neg_z_loop_length = 62
constexpr

Definition at line 19 of file pairing.hpp.

◆ precomputed_coefficients_length

constexpr size_t bb::pairing::precomputed_coefficients_length = 87
constexpr

Definition at line 20 of file pairing.hpp.

◆ two_inv

constexpr fq bb::pairing::two_inv = fq(2).invert()
constexpr

Definition at line 15 of file pairing_impl.hpp.