Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
straus_scalar_slice.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
8
10#include <optional>
11#include <vector>
12
13namespace bb::stdlib {
14
15// Forward declarations
16template <typename Builder> class cycle_group;
17template <typename Builder> class cycle_scalar;
18
24template <typename Builder> class straus_scalar_slices {
25 public:
27
28 straus_scalar_slices(Builder* context, const cycle_scalar<Builder>& scalars, size_t table_bits);
29 field_t operator[](size_t index);
32 std::vector<uint64_t> slices_native;
33
34 private:
36 const field_t& scalar,
37 size_t num_bits,
38 size_t table_bits);
39};
40
41} // namespace bb::stdlib
Represents a member of the Grumpkin curve scalar field (i.e. BN254 base field).
straus_scalar_slices decomposes an input scalar into bit-slices of size table_bits....
static std::pair< std::vector< field_t >, std::vector< uint64_t > > compute_scalar_slices(Builder *context, const field_t &scalar, size_t num_bits, size_t table_bits)
Convert an input cycle_scalar field element into a vector of bit-slices.
field_t operator[](size_t index)
Return a bit-slice associated with round index.
StrictMock< MockContext > context
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13