Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
keccak_constraint.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
#include "
barretenberg/dsl/acir_format/witness_constant.hpp
"
9
#include "
barretenberg/serialize/msgpack.hpp
"
10
#include <array>
11
#include <cstdint>
12
#include <vector>
13
14
namespace
acir_format
{
15
16
struct
HashInput
{
17
uint32_t
witness
;
18
uint32_t
num_bits
;
19
20
// For serialization, update with any new fields
21
MSGPACK_FIELDS
(
witness
,
num_bits
);
22
friend
bool
operator==
(
HashInput
const
& lhs,
HashInput
const
& rhs) =
default
;
23
};
24
25
struct
Keccakf1600
{
26
std::array<WitnessOrConstant<bb::fr>
, 25>
state
;
27
std::array<uint32_t, 25>
result
;
28
29
// For serialization, update with any new fields
30
MSGPACK_FIELDS
(
state
,
result
);
31
friend
bool
operator==
(
Keccakf1600
const
& lhs,
Keccakf1600
const
& rhs) =
default
;
32
};
33
34
template
<
typename
Builder>
void
create_keccak_permutations
(
Builder
&
builder
,
const
Keccakf1600
& constraint);
35
36
}
// namespace acir_format
bb::UltraCircuitBuilder_
Definition
ultra_circuit_builder.hpp:42
builder
AluTraceBuilder builder
Definition
alu.test.cpp:123
msgpack.hpp
acir_format
Definition
acir_format.cpp:34
acir_format::create_keccak_permutations
void create_keccak_permutations(Builder &builder, const Keccakf1600 &constraint)
Definition
keccak_constraint.cpp:14
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
acir_format::HashInput
Definition
keccak_constraint.hpp:16
acir_format::HashInput::operator==
friend bool operator==(HashInput const &lhs, HashInput const &rhs)=default
acir_format::HashInput::num_bits
uint32_t num_bits
Definition
keccak_constraint.hpp:18
acir_format::HashInput::MSGPACK_FIELDS
MSGPACK_FIELDS(witness, num_bits)
acir_format::HashInput::witness
uint32_t witness
Definition
keccak_constraint.hpp:17
acir_format::Keccakf1600
Definition
keccak_constraint.hpp:25
acir_format::Keccakf1600::result
std::array< uint32_t, 25 > result
Definition
keccak_constraint.hpp:27
acir_format::Keccakf1600::state
std::array< WitnessOrConstant< bb::fr >, 25 > state
Definition
keccak_constraint.hpp:26
acir_format::Keccakf1600::operator==
friend bool operator==(Keccakf1600 const &lhs, Keccakf1600 const &rhs)=default
acir_format::Keccakf1600::MSGPACK_FIELDS
MSGPACK_FIELDS(state, result)
witness_constant.hpp
src
barretenberg
dsl
acir_format
keccak_constraint.hpp
Generated by
1.9.8