Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::KeccakF1600 Class Reference

#include <keccakf1600.hpp>

Inheritance diagram for bb::avm2::simulation::KeccakF1600:
bb::avm2::simulation::KeccakF1600Interface

Public Member Functions

 KeccakF1600 (ExecutionIdManagerInterface &execution_id_manager, EventEmitterInterface< KeccakF1600Event > &keccakf1600_emitter, BitwiseInterface &bitwise, RangeCheckInterface &range_check, GreaterThanInterface &gt)
 
void permutation (MemoryInterface &memory, MemoryAddress dst_addr, MemoryAddress src_addr) override
 Perform the Keccak-f[1600] permutation (24 rounds) over a 25-word (5x5) 64-bit state.
 
- Public Member Functions inherited from bb::avm2::simulation::KeccakF1600Interface
virtual ~KeccakF1600Interface ()=default
 

Private Attributes

ExecutionIdManagerInterfaceexecution_id_manager
 
EventEmitterInterface< KeccakF1600Event > & perm_events
 
BitwiseInterfacebitwise
 
RangeCheckInterfacerange_check
 
GreaterThanInterfacegt
 

Detailed Description

Definition at line 49 of file keccakf1600.hpp.

Constructor & Destructor Documentation

◆ KeccakF1600()

bb::avm2::simulation::KeccakF1600::KeccakF1600 ( ExecutionIdManagerInterface execution_id_manager,
EventEmitterInterface< KeccakF1600Event > &  keccakf1600_emitter,
BitwiseInterface bitwise,
RangeCheckInterface range_check,
GreaterThanInterface gt 
)
inline

Definition at line 51 of file keccakf1600.hpp.

Member Function Documentation

◆ permutation()

void bb::avm2::simulation::KeccakF1600::permutation ( MemoryInterface memory,
MemoryAddress  dst_addr,
MemoryAddress  src_addr 
)
overridevirtual

Perform the Keccak-f[1600] permutation (24 rounds) over a 25-word (5x5) 64-bit state.

Reads AVM_KECCAKF1600_STATE_SIZE (25) U64 values from the memory slice starting at src_addr, applies 24 rounds of the Keccak-f permutation (theta, rho, pi, chi, iota), and writes the resulting state to the slice starting at dst_addr. Emits a KeccakF1600Event for tracegen.

Parameters
memoryMemory interface for reading/writing the state slices.
dst_addrBase address of the output memory slice (must fit 25 contiguous U64 values).
src_addrBase address of the input memory slice (must fit 25 contiguous U64 values).
Exceptions
KeccakF1600Exceptionif src_addr or dst_addr produces an out-of-range slice, or if any source memory value does not have tag U64.

Implements bb::avm2::simulation::KeccakF1600Interface.

Definition at line 76 of file keccakf1600.cpp.

Member Data Documentation

◆ bitwise

BitwiseInterface& bb::avm2::simulation::KeccakF1600::bitwise
private

Definition at line 68 of file keccakf1600.hpp.

◆ execution_id_manager

ExecutionIdManagerInterface& bb::avm2::simulation::KeccakF1600::execution_id_manager
private

Definition at line 66 of file keccakf1600.hpp.

◆ gt

GreaterThanInterface& bb::avm2::simulation::KeccakF1600::gt
private

Definition at line 70 of file keccakf1600.hpp.

◆ perm_events

EventEmitterInterface<KeccakF1600Event>& bb::avm2::simulation::KeccakF1600::perm_events
private

Definition at line 67 of file keccakf1600.hpp.

◆ range_check

RangeCheckInterface& bb::avm2::simulation::KeccakF1600::range_check
private

Definition at line 69 of file keccakf1600.hpp.


The documentation for this class was generated from the following files: