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: Complete, auditors: [Sergei], commit: dd03c4a23ab067274b4964cacb36d1545f73fb14}
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
11#include "sponge/sponge.hpp"
12
13namespace bb::crypto {
14
22template <typename Params> class Poseidon2 {
23 public:
24 using FF = typename Params::FF;
25
26 // We choose our rate to be t-1 and capacity to be 1.
28
32 static FF hash(const std::vector<FF>& input);
33};
34
36} // namespace bb::crypto
Implements a cryptographic sponge over prime fields. Implements the sponge specification from the Com...
Definition sponge.hpp:32
Native Poseidon2 hash function implementation.
Definition poseidon2.hpp:22
typename Params::FF FF
Definition poseidon2.hpp:24
static FF hash(const std::vector< FF > &input)
Hashes a vector of field elements.
Applies the Poseidon2 permutation function from https://eprint.iacr.org/2023/323.