Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
poseidon2.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/crypto/poseidon2/poseidon2_params.hpp
"
9
#include "
barretenberg/stdlib/hash/poseidon2/sponge/sponge.hpp
"
10
#include "
barretenberg/stdlib/primitives/field/field.hpp
"
11
12
namespace
bb::stdlib
{
13
20
template
<
typename
Builder>
class
poseidon2
{
21
22
private
:
23
using
field_ct
=
stdlib::field_t<Builder>
;
24
using
Params
=
crypto::Poseidon2Bn254ScalarFieldParams
;
25
using
Permutation
=
Poseidon2Permutation<Builder>
;
26
using
Sponge
=
FieldSponge<Builder>
;
27
28
public
:
29
static
field_ct
hash
(
const
std::vector<field_ct>
& in);
30
};
31
32
}
// namespace bb::stdlib
bb::stdlib::FieldSponge
Implements the circuit form of a cryptographic sponge over prime fields.
Definition
sponge.hpp:24
bb::stdlib::Poseidon2Permutation
Circuit form of Poseidon2 permutation from https://eprint.iacr.org/2023/323.
Definition
poseidon2_permutation.hpp:30
bb::stdlib::field_t< Builder >
bb::stdlib::poseidon2
stdlib class that evaluates in-circuit poseidon2 hashes, consistent with behavior in crypto::poseidon...
Definition
poseidon2.hpp:20
bb::stdlib::poseidon2::hash
static field_ct hash(const std::vector< field_ct > &in)
Hash a vector of field_ct.
Definition
poseidon2.cpp:13
bb::stdlib
Definition
graph_description_goblin.test.cpp:13
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
poseidon2_params.hpp
sponge.hpp
field.hpp
bb::crypto::Poseidon2Bn254ScalarFieldParams
Definition
poseidon2_params.hpp:16
src
barretenberg
stdlib
hash
poseidon2
poseidon2.hpp
Generated by
1.9.8