Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::plookup::ecc_generator_tables::ecc_generator_table< G1 > Class Template Reference

#include <non_native_group_generator.hpp>

Public Types

using element = typename G1::element
 

Static Public Member Functions

static void init_generator_tables ()
 
static std::array< fr, 2 > get_xlo_endo_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_xhi_endo_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_xlo_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_xhi_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_ylo_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_yhi_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_xyprime_values (const std::array< uint64_t, 2 > key)
 
static std::array< fr, 2 > get_xyprime_endo_values (const std::array< uint64_t, 2 > key)
 
static BasicTable generate_xlo_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_xhi_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_xlo_endo_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_xhi_endo_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_ylo_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_yhi_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_xyprime_table (BasicTableId id, const size_t table_index)
 
static BasicTable generate_xyprime_endo_table (BasicTableId id, const size_t table_index)
 
static MultiTable get_xlo_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_xhi_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_xlo_endo_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_xhi_endo_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_ylo_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_yhi_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_xyprime_table (const MultiTableId id, const BasicTableId basic_id)
 
static MultiTable get_xyprime_endo_table (const MultiTableId id, const BasicTableId basic_id)
 

Static Public Attributes

static std::array< std::pair< fr, fr >, 256 > generator_endo_xlo_table
 
static std::array< std::pair< fr, fr >, 256 > generator_endo_xhi_table
 
static std::array< std::pair< fr, fr >, 256 > generator_xlo_table
 
static std::array< std::pair< fr, fr >, 256 > generator_xhi_table
 
static std::array< std::pair< fr, fr >, 256 > generator_ylo_table
 
static std::array< std::pair< fr, fr >, 256 > generator_yhi_table
 
static std::array< std::pair< fr, fr >, 256 > generator_xyprime_table
 
static std::array< std::pair< fr, fr >, 256 > generator_endo_xyprime_table
 
static bool init = false
 

Detailed Description

template<typename G1>
class bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >

Definition at line 17 of file non_native_group_generator.hpp.

Member Typedef Documentation

◆ element

template<typename G1 >
using bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::element = typename G1::element

Definition at line 19 of file non_native_group_generator.hpp.

Member Function Documentation

◆ generate_xhi_endo_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xhi_endo_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 251 of file non_native_group_generator.cpp.

◆ generate_xhi_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xhi_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 203 of file non_native_group_generator.cpp.

◆ generate_xlo_endo_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xlo_endo_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 227 of file non_native_group_generator.cpp.

◆ generate_xlo_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xlo_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 180 of file non_native_group_generator.cpp.

◆ generate_xyprime_endo_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xyprime_endo_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 345 of file non_native_group_generator.cpp.

◆ generate_xyprime_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_xyprime_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 321 of file non_native_group_generator.cpp.

◆ generate_yhi_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_yhi_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 297 of file non_native_group_generator.cpp.

◆ generate_ylo_table()

template<typename G1 >
BasicTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generate_ylo_table ( BasicTableId  id,
const size_t  table_index 
)
static

Definition at line 274 of file non_native_group_generator.cpp.

◆ get_xhi_endo_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xhi_endo_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 414 of file non_native_group_generator.cpp.

◆ get_xhi_endo_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xhi_endo_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 high 68-bit limbs of x-coordinate (for endomorphism point \lambda.[1])

Definition at line 126 of file non_native_group_generator.cpp.

◆ get_xhi_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xhi_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 384 of file non_native_group_generator.cpp.

◆ get_xhi_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xhi_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 high 68-bit limbs of x-coordinate

Definition at line 102 of file non_native_group_generator.cpp.

◆ get_xlo_endo_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xlo_endo_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 399 of file non_native_group_generator.cpp.

◆ get_xlo_endo_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xlo_endo_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 low 68-bit limbs of x-coordinate (for endomorphism point \lambda.[P])

Definition at line 114 of file non_native_group_generator.cpp.

◆ get_xlo_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xlo_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 369 of file non_native_group_generator.cpp.

◆ get_xlo_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xlo_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 low 68-bit limbs of x-coordinate

Definition at line 91 of file non_native_group_generator.cpp.

◆ get_xyprime_endo_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xyprime_endo_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 474 of file non_native_group_generator.cpp.

◆ get_xyprime_endo_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xyprime_endo_values ( const std::array< uint64_t, 2 >  key)
static

Get the prime basis limbs for the x and y coordinates (endomorphism version for \lambda.[1])

Definition at line 172 of file non_native_group_generator.cpp.

◆ get_xyprime_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xyprime_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 459 of file non_native_group_generator.cpp.

◆ get_xyprime_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_xyprime_values ( const std::array< uint64_t, 2 >  key)
static

Get the prime basis limbs for the x and y coordinates

Definition at line 160 of file non_native_group_generator.cpp.

◆ get_yhi_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_yhi_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 444 of file non_native_group_generator.cpp.

◆ get_yhi_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_yhi_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 high 68-bit limbs of y-coordinate

Definition at line 148 of file non_native_group_generator.cpp.

◆ get_ylo_table()

template<typename G1 >
MultiTable bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_ylo_table ( const MultiTableId  id,
const BasicTableId  basic_id 
)
static

Definition at line 429 of file non_native_group_generator.cpp.

◆ get_ylo_values()

template<typename G1 >
std::array< bb::fr, 2 > bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::get_ylo_values ( const std::array< uint64_t, 2 >  key)
static

Get 2 low 68-bit limbs of y-coordinate

Definition at line 137 of file non_native_group_generator.cpp.

◆ init_generator_tables()

template<typename G1 >
void bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::init_generator_tables ( )
static

Init 8-bit generator lookup tables The 8-bit wNAF is structured so that entries are in the range [0, ..., 255]

The actual scalar value = (wNAF * 2) - 255

scalar values are from the values [-255, -253, ..., -3, -1, 1, 3, ..., 253, 255]

Definition at line 19 of file non_native_group_generator.cpp.

Member Data Documentation

◆ generator_endo_xhi_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_endo_xhi_table
inlinestatic

Definition at line 35 of file non_native_group_generator.hpp.

◆ generator_endo_xlo_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_endo_xlo_table
inlinestatic

Store arrays of precomputed 8-bit lookup tables for generator point coordinates (and their endomorphism equivalents):

  • xlo_table: (x0, x1) = low limbs of x-coordinate
  • xhi_table: (x2, x3) = high limbs of x-coordinate
  • ylo_table: (y0, y1) = low limbs of y-coordinate
  • yhi_table: (y2, y3) = high limbs of y-coordinate
  • xyprime_table: (xp, yp) = x-coordinate and y-coordinate in prime basis (i.e., x % p, y % p)
  • endo_xlo_table: (x0', x1') = low limbs of endomorphism-mapped x-coordinate (x' = x * beta)
  • endo_xhi_table: (x2', x3') = high limbs of endomorphism-mapped x-coordinate (x' = x * beta)
  • endo_xyprime_table: (x'p, yp) = endomorphism-mapped x and y-coord in prime basis (i.e., x' % p, y % p)

Each table has 256 rows and 2 columns.

Definition at line 34 of file non_native_group_generator.hpp.

◆ generator_endo_xyprime_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_endo_xyprime_table
inlinestatic

Definition at line 41 of file non_native_group_generator.hpp.

◆ generator_xhi_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_xhi_table
inlinestatic

Definition at line 37 of file non_native_group_generator.hpp.

◆ generator_xlo_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_xlo_table
inlinestatic

Definition at line 36 of file non_native_group_generator.hpp.

◆ generator_xyprime_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_xyprime_table
inlinestatic

Definition at line 40 of file non_native_group_generator.hpp.

◆ generator_yhi_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_yhi_table
inlinestatic

Definition at line 39 of file non_native_group_generator.hpp.

◆ generator_ylo_table

template<typename G1 >
std::array<std::pair<fr, fr>, 256> bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::generator_ylo_table
inlinestatic

Definition at line 38 of file non_native_group_generator.hpp.

◆ init

template<typename G1 >
bool bb::plookup::ecc_generator_tables::ecc_generator_table< G1 >::init = false
inlinestatic

Definition at line 42 of file non_native_group_generator.hpp.


The documentation for this class was generated from the following files: