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

#include <sha256.hpp>

Inheritance diagram for bb::avm2::simulation::Sha256:
bb::avm2::simulation::Sha256Interface

Public Member Functions

 Sha256 (ExecutionIdGetterInterface &execution_id_manager, BitwiseInterface &bitwise, GreaterThanInterface &gt, EventEmitterInterface< Sha256CompressionEvent > &event_emitter)
 
void compression (MemoryInterface &memory, MemoryAddress state_addr, MemoryAddress input_addr, MemoryAddress output_addr) override
 
- Public Member Functions inherited from bb::avm2::simulation::Sha256Interface
virtual ~Sha256Interface ()=default
 

Private Member Functions

MemoryValue shr (const MemoryValue &x, uint32_t shift)
 
MemoryValue ror (const MemoryValue &x, uint32_t shift)
 
MemoryValue modulo_sum (std::span< const MemoryValue > values)
 

Private Attributes

ExecutionIdGetterInterfaceexecution_id_manager
 
BitwiseInterfacebitwise
 
GreaterThanInterfacegt
 
EventEmitterInterface< Sha256CompressionEvent > & events
 

Detailed Description

Definition at line 25 of file sha256.hpp.

Constructor & Destructor Documentation

◆ Sha256()

bb::avm2::simulation::Sha256::Sha256 ( ExecutionIdGetterInterface execution_id_manager,
BitwiseInterface bitwise,
GreaterThanInterface gt,
EventEmitterInterface< Sha256CompressionEvent > &  event_emitter 
)
inline

Definition at line 27 of file sha256.hpp.

Member Function Documentation

◆ compression()

void bb::avm2::simulation::Sha256::compression ( MemoryInterface memory,
MemoryAddress  state_addr,
MemoryAddress  input_addr,
MemoryAddress  output_addr 
)
overridevirtual

Implements bb::avm2::simulation::Sha256Interface.

Definition at line 81 of file sha256.cpp.

◆ modulo_sum()

MemoryValue bb::avm2::simulation::Sha256::modulo_sum ( std::span< const MemoryValue values)
private

Definition at line 62 of file sha256.cpp.

◆ ror()

MemoryValue bb::avm2::simulation::Sha256::ror ( const MemoryValue x,
uint32_t  shift 
)
private

Definition at line 30 of file sha256.cpp.

◆ shr()

MemoryValue bb::avm2::simulation::Sha256::shr ( const MemoryValue x,
uint32_t  shift 
)
private

Definition at line 46 of file sha256.cpp.

Member Data Documentation

◆ bitwise

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

Definition at line 49 of file sha256.hpp.

◆ events

EventEmitterInterface<Sha256CompressionEvent>& bb::avm2::simulation::Sha256::events
private

Definition at line 51 of file sha256.hpp.

◆ execution_id_manager

ExecutionIdGetterInterface& bb::avm2::simulation::Sha256::execution_id_manager
private

Definition at line 48 of file sha256.hpp.

◆ gt

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

Definition at line 50 of file sha256.hpp.


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