Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
aes128_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 "
barretenberg/stdlib/primitives/field/field.hpp
"
11
#include <array>
12
#include <cstdint>
13
#include <vector>
14
15
namespace
acir_format
{
16
17
struct
AES128Input
{
18
uint32_t
witness
;
19
uint32_t
num_bits
;
20
21
// For serialization, update with any new fields
22
MSGPACK_FIELDS
(
witness
,
num_bits
);
23
friend
bool
operator==
(
AES128Input
const
& lhs,
AES128Input
const
& rhs) =
default
;
24
};
25
26
struct
AES128Constraint
{
27
std::vector<WitnessOrConstant<bb::fr>
>
inputs
;
28
std::array<WitnessOrConstant<bb::fr>
, 16>
iv
;
29
std::array<WitnessOrConstant<bb::fr>
, 16>
key
;
30
std::vector<uint32_t>
outputs
;
31
32
// For serialization, update with any new fields
33
MSGPACK_FIELDS
(
inputs
,
iv
,
key
,
outputs
);
34
friend
bool
operator==
(
AES128Constraint
const
& lhs,
AES128Constraint
const
& rhs) =
default
;
35
};
36
37
template
<
typename
Builder>
void
create_aes128_constraints
(
Builder
&
builder
,
const
AES128Constraint
& constraint);
38
39
}
// 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_aes128_constraints
void create_aes128_constraints(Builder &builder, const AES128Constraint &constraint)
Definition
aes128_constraint.cpp:18
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
field.hpp
acir_format::AES128Constraint
Definition
aes128_constraint.hpp:26
acir_format::AES128Constraint::iv
std::array< WitnessOrConstant< bb::fr >, 16 > iv
Definition
aes128_constraint.hpp:28
acir_format::AES128Constraint::MSGPACK_FIELDS
MSGPACK_FIELDS(inputs, iv, key, outputs)
acir_format::AES128Constraint::outputs
std::vector< uint32_t > outputs
Definition
aes128_constraint.hpp:30
acir_format::AES128Constraint::operator==
friend bool operator==(AES128Constraint const &lhs, AES128Constraint const &rhs)=default
acir_format::AES128Constraint::inputs
std::vector< WitnessOrConstant< bb::fr > > inputs
Definition
aes128_constraint.hpp:27
acir_format::AES128Constraint::key
std::array< WitnessOrConstant< bb::fr >, 16 > key
Definition
aes128_constraint.hpp:29
acir_format::AES128Input
Definition
aes128_constraint.hpp:17
acir_format::AES128Input::MSGPACK_FIELDS
MSGPACK_FIELDS(witness, num_bits)
acir_format::AES128Input::num_bits
uint32_t num_bits
Definition
aes128_constraint.hpp:19
acir_format::AES128Input::operator==
friend bool operator==(AES128Input const &lhs, AES128Input const &rhs)=default
acir_format::AES128Input::witness
uint32_t witness
Definition
aes128_constraint.hpp:18
witness_constant.hpp
src
barretenberg
dsl
acir_format
aes128_constraint.hpp
Generated by
1.9.8