|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Parameters definitions for our fixed-base-scalar-multiplication lookup tables. More...
#include <fixed_base_params.hpp>
Static Public Member Functions | |
| template<size_t multitable_index> | |
| static constexpr size_t | get_num_bits_of_multi_table () |
| Returns the number of scalar mul bits we are traversing in multitable with the given index. | |
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 | NUM_FIXED_BASE_MULTI_TABLES = 4 |
| static constexpr size_t | NUM_TABLES_PER_LO_MULTITABLE = numeric::ceil_div(BITS_PER_LO_SCALAR, BITS_PER_TABLE) |
| static constexpr size_t | NUM_TABLES_PER_HI_MULTITABLE = numeric::ceil_div(BITS_PER_HI_SCALAR, BITS_PER_TABLE) |
| static constexpr size_t | MAX_NUM_TABLES_IN_MULTITABLE |
| static const bb::fr | COLUMN_2_STEP_SIZE = bb::fr(0) |
| static const bb::fr | COLUMN_3_STEP_SIZE = bb::fr(0) |
Parameters definitions for our fixed-base-scalar-multiplication lookup tables.
We split each 254-bit scalar mul into two scalar muls of size BITS_PER_LO_SCALAR, BITS_PER_HI_SCALAR. This enables us to efficiently decompose our input scalar multiplier into two chunks of a known size (i.e. we get free BITS_PER_LO_SCALAR, BITS_PER_HI_SCALAR range checks as part of the lookup table subroutine). This in turn allows us to perform a primality test more efficiently, i.e. check that input scalar < prime modulus when evaluated over the integers. (The primality check requires us to split the input into high / low bit chunks so getting this for free as part of the lookup algorithm is nice!).
Definition at line 26 of file fixed_base_params.hpp.
|
inlinestaticconstexpr |
Returns the number of scalar mul bits we are traversing in multitable with the given index.
| multitable_index | Ranges from 0 to NUM_FIXED_BASE_MULTI_TABLES - 1 |
Definition at line 54 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 28 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 31 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 30 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 27 of file fixed_base_params.hpp.
Definition at line 45 of file fixed_base_params.hpp.
Definition at line 46 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 39 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 34 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 36 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 38 of file fixed_base_params.hpp.
|
staticconstexpr |
Definition at line 37 of file fixed_base_params.hpp.