Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
keccakf1600_event.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <cstdint>
5#include <stdexcept>
6#include <string>
7
10
11namespace bb::avm2::simulation {
12
20struct KeccakF1600Exception : public std::runtime_error {
21 explicit KeccakF1600Exception(const std::string& message)
22 : std::runtime_error("Error in KeccakF1600 permutation: " + message)
23 {}
24};
25
30
48
66
67} // namespace bb::avm2::simulation
AVM range check gadget for witness generation.
std::array< std::array< uint64_t, 5 >, 5 > KeccakF1600State
5x5 matrix of 64-bit words representing the Keccak state A[x][y].
std::array< std::array< MemoryValue, 5 >, 5 > KeccakF1600StateMemValues
5x5 matrix of MemoryValue representing the Keccak state (used during simulation).
uint32_t MemoryAddress
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Event emitted by the Keccak-f[1600] simulation for trace generation.
std::array< MemoryValue, AVM_KECCAKF1600_STATE_SIZE > src_mem_values
std::array< KeccakF1600RoundData, AVM_KECCAKF1600_NUM_ROUNDS > rounds
Per-round intermediate data.
Exception thrown on errors during the Keccak-f[1600] permutation.
KeccakF1600Exception(const std::string &message)
Intermediate values produced by a single Keccak-f[1600] round.
KeccakF1600State state_pi_not
Bitwise NOT of state after pi step.
KeccakF1600State state_theta
State after theta step.
uint64_t state_iota_00
state_chi[0][0] XOR round_constant.
KeccakF1600State state
Round input state.
KeccakF1600State state_rho
State after rho (rotation) step.
KeccakF1600State state_pi_and
AND(NOT(pi[(x+1)%5][y]), pi[(x+2)%5][y]).
KeccakF1600State state_chi
State after chi step.
std::array< uint64_t, 5 > theta_combined_xor
D[x] = C[(x-1)%5] ^ rot(C[(x+1)%5], 1).
std::array< std::array< uint64_t, 4 >, 5 > theta_xor
Accumulated column-parity XORs (4 intermediates per row).
std::array< uint64_t, 5 > theta_xor_row_rotl1
Column parity rotated left by 1.