barretenberg
Loading...
Searching...
No Matches
poseidon2.hpp
1#pragma once
2
3#include "poseidon2_params.hpp"
4#include "poseidon2_permutation.hpp"
5#include "sponge/sponge.hpp"
6
7namespace crypto {
8
9template <typename Params> class Poseidon2 {
10 public:
11 using FF = typename Params::FF;
12
13 using Sponge = FieldSponge<FF, Params::t - 1, 1, Params::t, Poseidon2Permutation<Params>>;
14 static FF hash(std::span<FF> input) { return Sponge::hash_fixed_length(input); }
15};
16} // namespace crypto
Implements a cryptographic sponge over prime fields. Implements the sponge specification from the Com...
Definition: sponge.hpp:26
Applies the Poseidon2 permutation function from https://eprint.iacr.org/2023/323 ....
Definition: poseidon2_permutation.hpp:20
Definition: poseidon2.hpp:9
Definition: aes128.cpp:9