Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::plookup::FixedBaseParams Struct Reference

Parameters definitions for our fixed-base-scalar-multiplication lookup tables. More...

#include <fixed_base_params.hpp>

Inheritance diagram for bb::plookup::FixedBaseParams:
bb::plookup::fixed_base::table

Static Public Member Functions

template<size_t num_bits>
static constexpr size_t get_num_tables_per_multi_table () noexcept
 For a scalar multiplication table that covers input scalars up to (1 << num_bits) - 1, how many individual lookup tables of max size BITS_PER_TABLE do we need? (e.g. if BITS_PER_TABLE = 9, for num_bits = 126 it's 14. For num_bits = 128 it's 15)
 
template<size_t multitable_index>
static constexpr size_t get_num_bits_of_multi_table ()
 For a given multitable index, how many scalar mul bits are we traversing with our multitable?
 

Static Public Attributes

static constexpr size_t BITS_PER_TABLE = 9
 
static constexpr size_t BITS_ON_CURVE = 254
 
static constexpr size_t BITS_PER_LO_SCALAR = 128
 
static constexpr size_t BITS_PER_HI_SCALAR = BITS_ON_CURVE - BITS_PER_LO_SCALAR
 
static constexpr size_t MAX_TABLE_SIZE = (1UL) << BITS_PER_TABLE
 
static constexpr size_t MAX_NUM_TABLES_IN_MULTITABLE
 
static constexpr size_t NUM_POINTS = 2
 
static constexpr size_t NUM_FIXED_BASE_MULTI_TABLES = NUM_POINTS * 2
 
static constexpr size_t NUM_TABLES_PER_LO_MULTITABLE
 
static constexpr size_t NUM_TABLES_PER_HI_MULTITABLE
 
static constexpr size_t NUM_BASIC_TABLES_PER_BASE_POINT
 
static constexpr size_t NUM_FIXED_BASE_BASIC_TABLES = NUM_BASIC_TABLES_PER_BASE_POINT * NUM_POINTS
 

Detailed Description

Parameters definitions for our fixed-base-scalar-multiplication lookup tables.

Definition at line 19 of file fixed_base_params.hpp.

Member Function Documentation

◆ get_num_bits_of_multi_table()

template<size_t multitable_index>
static constexpr size_t bb::plookup::FixedBaseParams::get_num_bits_of_multi_table ( )
inlinestaticconstexpr

For a given multitable index, how many scalar mul bits are we traversing with our multitable?

Parameters
multitable_indexRanges from 0 to NUM_FIXED_BASE_MULTI_TABLES - 1
Returns
constexpr size_t

Definition at line 72 of file fixed_base_params.hpp.

◆ get_num_tables_per_multi_table()

template<size_t num_bits>
static constexpr size_t bb::plookup::FixedBaseParams::get_num_tables_per_multi_table ( )
inlinestaticconstexprnoexcept

For a scalar multiplication table that covers input scalars up to (1 << num_bits) - 1, how many individual lookup tables of max size BITS_PER_TABLE do we need? (e.g. if BITS_PER_TABLE = 9, for num_bits = 126 it's 14. For num_bits = 128 it's 15)

Template Parameters
num_bits
Returns
constexpr size_t

Definition at line 61 of file fixed_base_params.hpp.

Member Data Documentation

◆ BITS_ON_CURVE

constexpr size_t bb::plookup::FixedBaseParams::BITS_ON_CURVE = 254
staticconstexpr

Definition at line 21 of file fixed_base_params.hpp.

◆ BITS_PER_HI_SCALAR

constexpr size_t bb::plookup::FixedBaseParams::BITS_PER_HI_SCALAR = BITS_ON_CURVE - BITS_PER_LO_SCALAR
staticconstexpr

Definition at line 31 of file fixed_base_params.hpp.

◆ BITS_PER_LO_SCALAR

constexpr size_t bb::plookup::FixedBaseParams::BITS_PER_LO_SCALAR = 128
staticconstexpr

Definition at line 30 of file fixed_base_params.hpp.

◆ BITS_PER_TABLE

constexpr size_t bb::plookup::FixedBaseParams::BITS_PER_TABLE = 9
staticconstexpr

Definition at line 20 of file fixed_base_params.hpp.

◆ MAX_NUM_TABLES_IN_MULTITABLE

constexpr size_t bb::plookup::FixedBaseParams::MAX_NUM_TABLES_IN_MULTITABLE
staticconstexpr
Initial value:

Definition at line 37 of file fixed_base_params.hpp.

◆ MAX_TABLE_SIZE

constexpr size_t bb::plookup::FixedBaseParams::MAX_TABLE_SIZE = (1UL) << BITS_PER_TABLE
staticconstexpr

Definition at line 34 of file fixed_base_params.hpp.

◆ NUM_BASIC_TABLES_PER_BASE_POINT

constexpr size_t bb::plookup::FixedBaseParams::NUM_BASIC_TABLES_PER_BASE_POINT
staticconstexpr
Initial value:

Definition at line 48 of file fixed_base_params.hpp.

◆ NUM_FIXED_BASE_BASIC_TABLES

constexpr size_t bb::plookup::FixedBaseParams::NUM_FIXED_BASE_BASIC_TABLES = NUM_BASIC_TABLES_PER_BASE_POINT * NUM_POINTS
staticconstexpr

Definition at line 52 of file fixed_base_params.hpp.

◆ NUM_FIXED_BASE_MULTI_TABLES

constexpr size_t bb::plookup::FixedBaseParams::NUM_FIXED_BASE_MULTI_TABLES = NUM_POINTS * 2
staticconstexpr

Definition at line 42 of file fixed_base_params.hpp.

◆ NUM_POINTS

constexpr size_t bb::plookup::FixedBaseParams::NUM_POINTS = 2
staticconstexpr

Definition at line 39 of file fixed_base_params.hpp.

◆ NUM_TABLES_PER_HI_MULTITABLE

constexpr size_t bb::plookup::FixedBaseParams::NUM_TABLES_PER_HI_MULTITABLE
staticconstexpr
Initial value:

Definition at line 45 of file fixed_base_params.hpp.

◆ NUM_TABLES_PER_LO_MULTITABLE

constexpr size_t bb::plookup::FixedBaseParams::NUM_TABLES_PER_LO_MULTITABLE
staticconstexpr
Initial value:

Definition at line 43 of file fixed_base_params.hpp.


The documentation for this struct was generated from the following file: