Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
poseidon.hpp
Go to the documentation of this file.
1
#ifdef STARKNET_GARAGA_FLAVORS
2
#pragma once
3
4
#include "
barretenberg/crypto/poseidon2/sponge/sponge.hpp
"
5
#include "
poseidon_params.hpp
"
6
#include "
poseidon_permutation.hpp
"
7
8
namespace
bb::starknet::crypto
{
9
10
template
<
typename
Params>
class
Poseidon {
11
public
:
12
using
FF
=
typename
Params::FF
;
13
14
using
Sponge =
bb::crypto::FieldSponge
<
FF
,
Params::t
- 1, 1,
Params::t
, PoseidonPermutation<Params>>;
15
16
static
FF
hash
(
const
std::vector<FF>& input);
17
18
static
FF
hash
(
const
std::vector<FF>& input,
FF
iv);
19
};
20
21
extern
template
class
Poseidon<PoseidonStark252BaseFieldParams>;
22
23
}
// namespace bb::starknet::crypto
24
#endif
FF
bb::fr FF
Definition
barycentric.bench.cpp:11
bb::crypto::FieldSponge
Implements a cryptographic sponge over prime fields. Implements the sponge specification from the Com...
Definition
sponge.hpp:32
sponge.hpp
hash
void hash(State &state) noexcept
Definition
merkle_tree.bench.cpp:28
bb::starknet::crypto
Definition
poseidon.cpp:23
poseidon_params.hpp
poseidon_permutation.hpp
bb::crypto::Poseidon2Bn254ScalarFieldParams::t
static constexpr size_t t
Definition
poseidon2_params.hpp:19
bb::crypto::Poseidon2Bn254ScalarFieldParams::FF
bb::fr FF
Definition
poseidon2_params.hpp:18
bb::field< Bn254FrParams >
src
barretenberg
ext
starknet
crypto
poseidon
poseidon.hpp
Generated by
1.9.8