4#include "barretenberg/ecc/curves/bn254/fr.hpp"
5#include "barretenberg/ecc/curves/bn254/g1.hpp"
6#include "barretenberg/ecc/curves/secp256k1/secp256k1.hpp"
10namespace ecc_generator_tables {
14 typedef typename G1::element element;
20 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_endo_xhi_table;
21 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_xlo_table;
22 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_xhi_table;
23 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_ylo_table;
24 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_yhi_table;
25 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_xyprime_table;
26 inline static std::array<std::pair<barretenberg::fr, barretenberg::fr>, 256> generator_endo_xyprime_table;
27 inline static bool init =
false;
31 static size_t convert_position_to_shifted_naf(
const size_t position);
32 static size_t convert_shifted_naf_to_position(
const size_t shifted_naf);
33 static std::array<barretenberg::fr, 2>
get_xlo_endo_values(
const std::array<uint64_t, 2> key);
34 static std::array<barretenberg::fr, 2>
get_xhi_endo_values(
const std::array<uint64_t, 2> key);
35 static std::array<barretenberg::fr, 2>
get_xlo_values(
const std::array<uint64_t, 2> key);
36 static std::array<barretenberg::fr, 2>
get_xhi_values(
const std::array<uint64_t, 2> key);
37 static std::array<barretenberg::fr, 2>
get_ylo_values(
const std::array<uint64_t, 2> key);
38 static std::array<barretenberg::fr, 2>
get_yhi_values(
const std::array<uint64_t, 2> key);
39 static std::array<barretenberg::fr, 2>
get_xyprime_values(
const std::array<uint64_t, 2> key);
41 static BasicTable generate_xlo_table(BasicTableId
id,
const size_t table_index);
42 static BasicTable generate_xhi_table(BasicTableId
id,
const size_t table_index);
43 static BasicTable generate_xlo_endo_table(BasicTableId
id,
const size_t table_index);
44 static BasicTable generate_xhi_endo_table(BasicTableId
id,
const size_t table_index);
45 static BasicTable generate_ylo_table(BasicTableId
id,
const size_t table_index);
46 static BasicTable generate_yhi_table(BasicTableId
id,
const size_t table_index);
47 static BasicTable generate_xyprime_table(BasicTableId
id,
const size_t table_index);
48 static BasicTable generate_xyprime_endo_table(BasicTableId
id,
const size_t table_index);
49 static MultiTable get_xlo_table(
const MultiTableId
id,
const BasicTableId basic_id);
50 static MultiTable get_xhi_table(
const MultiTableId
id,
const BasicTableId basic_id);
51 static MultiTable get_xlo_endo_table(
const MultiTableId
id,
const BasicTableId basic_id);
52 static MultiTable get_xhi_endo_table(
const MultiTableId
id,
const BasicTableId basic_id);
53 static MultiTable get_ylo_table(
const MultiTableId
id,
const BasicTableId basic_id);
54 static MultiTable get_yhi_table(
const MultiTableId
id,
const BasicTableId basic_id);
55 static MultiTable get_xyprime_table(
const MultiTableId
id,
const BasicTableId basic_id);
56 static MultiTable get_xyprime_endo_table(
const MultiTableId
id,
const BasicTableId basic_id);
Definition: non_native_group_generator.hpp:12
static std::array< barretenberg::fr, 2 > get_xhi_endo_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:131
static std::array< barretenberg::fr, 2 > get_ylo_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:143
static std::array< barretenberg::fr, 2 > get_yhi_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:155
static std::array< barretenberg::fr, 2 > get_xyprime_endo_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:179
static std::array< std::pair< barretenberg::fr, barretenberg::fr >, 256 > generator_endo_xlo_table
Definition: non_native_group_generator.hpp:19
static std::array< barretenberg::fr, 2 > get_xlo_endo_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:119
static std::array< barretenberg::fr, 2 > get_xlo_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:95
static std::array< barretenberg::fr, 2 > get_xyprime_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:167
static std::array< barretenberg::fr, 2 > get_xhi_values(const std::array< uint64_t, 2 > key)
Definition: non_native_group_generator.cpp:107
static void init_generator_tables()
Definition: non_native_group_generator.cpp:14
The structure contains the most basic table serving one function (for, example an xor table)
Definition: types.hpp:263
Definition: types.hpp:124