Parameters definitions for our fixed-base-scalar-multiplication lookup tables.
More...
#include <fixed_base_params.hpp>
|
| 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)
|
| |
| static constexpr size_t | get_num_bits_of_multi_table (const size_t multitable_index) |
| | For a given multitable index, how many scalar mul bits are we traversing with our multitable?
|
| |
|
|
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 |
| |
Parameters definitions for our fixed-base-scalar-multiplication lookup tables.
◆ get_num_bits_of_multi_table()
| static constexpr size_t plookup::FixedBaseParams::get_num_bits_of_multi_table |
( |
const size_t |
multitable_index | ) |
|
|
inlinestaticconstexpr |
For a given multitable index, how many scalar mul bits are we traversing with our multitable?
- Parameters
-
| multitable_index | Ranges from 0 to NUM_FIXED_BASE_MULTI_TABLES - 1 |
- Returns
- constexpr size_t
◆ get_num_tables_per_multi_table()
template<size_t num_bits>
| static constexpr size_t 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
-
- Returns
- constexpr size_t
◆ MAX_NUM_TABLES_IN_MULTITABLE
| constexpr size_t plookup::FixedBaseParams::MAX_NUM_TABLES_IN_MULTITABLE |
|
staticconstexpr |
Initial value:=
(BITS_PER_LO_SCALAR / BITS_PER_TABLE) + (BITS_PER_LO_SCALAR % BITS_PER_TABLE == 0 ? 0 : 1)
◆ NUM_BASIC_TABLES_PER_BASE_POINT
| constexpr size_t plookup::FixedBaseParams::NUM_BASIC_TABLES_PER_BASE_POINT |
|
staticconstexpr |
Initial value:=
(NUM_TABLES_PER_LO_MULTITABLE + NUM_TABLES_PER_HI_MULTITABLE)
◆ NUM_TABLES_PER_HI_MULTITABLE
| constexpr size_t plookup::FixedBaseParams::NUM_TABLES_PER_HI_MULTITABLE |
|
staticconstexpr |
Initial value:=
(BITS_PER_HI_SCALAR / BITS_PER_TABLE) + ((BITS_PER_HI_SCALAR % BITS_PER_TABLE == 0) ? 0 : 1)
◆ NUM_TABLES_PER_LO_MULTITABLE
| constexpr size_t plookup::FixedBaseParams::NUM_TABLES_PER_LO_MULTITABLE |
|
staticconstexpr |
Initial value:=
(BITS_PER_LO_SCALAR / BITS_PER_TABLE) + ((BITS_PER_LO_SCALAR % BITS_PER_TABLE == 0) ? 0 : 1)
The documentation for this struct was generated from the following file: