33 uint32_t round_constant,
39 const std::array<uint32_t, 8>& init_state,
std::vector< Event > Container
void process(const simulation::EventEmitterInterface< simulation::Sha256CompressionEvent >::Container &events, TraceContainer &trace)
Process the SHA-256 compression events and populate the relevant columns in the trace.
uint32_t ror_with_witness(const uint32_t val, const uint8_t shift, Column col_result, Column col_rhs, TraceContainer &trace) const
Perform a 32-bit right rotation and insert the result and rhs limb into the trace.
void set_state_cols(const std::array< uint32_t, 8 > &state, TraceContainer &trace) const
Set the 8 round-state columns (a..h) at the current row.
void set_helper_cols(const std::array< uint32_t, 16 > &prev_w_helpers, TraceContainer &trace) const
Set the 16 message-schedule helper columns (w0..w15) at the current row.
uint32_t compute_w_with_witness(const std::array< uint32_t, 16 > &prev_w_helpers, TraceContainer &trace) const
Compute the message schedule word w[j] for a non-input round and insert witness data into the trace.
static const InteractionDefinition interactions
uint32_t shr_with_witness(const uint32_t val, const uint8_t shift, Column col_lhs, Column col_rhs, TraceContainer &trace) const
Perform a 32-bit right shift and insert the limb decomposition into the trace.
void compute_sha256_output(const std::array< uint32_t, 8 > &out_state, const std::array< uint32_t, 8 > &init_state, TraceContainer &trace) const
Compute the final SHA-256 output (init_state + final_round_state mod 2^32) and write to the trace.
void into_limbs_with_witness(const uint64_t, const uint8_t b, Column col_lhs, Column col_rhs, TraceContainer &trace) const
Decompose a value into high and low limbs at a given bit position and write them to the trace.
void set_init_state_cols(const std::array< uint32_t, 8 > &init_state, TraceContainer &trace) const
Set the 8 initial-state columns (init_a..init_h) at the current row.
std::array< uint32_t, 8 > compute_compression_with_witness(const std::array< uint32_t, 8 > &state, uint32_t round_w, uint32_t round_constant, TraceContainer &trace) const
Perform one round of the SHA-256 compression function and insert all witness data into the trace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept