32template <
typename FF,
size_t rate,
size_t capacity,
size_t t,
typename Permutation>
class FieldSponge {
46 for (
size_t i = 0; i < rate; ++i) {
86 const size_t in_len = input.size();
102 const size_t in_len = input.size();
103 for (
size_t i = 0; i < in_len; ++i) {
Implements a cryptographic sponge over prime fields. Implements the sponge specification from the Com...
static FF hash_internal(std::span< const FF > input)
Use the sponge to hash an input vector.
void absorb(const FF &input)
FieldSponge(FF domain_iv)
std::array< FF, rate > cache
std::array< FF, t > state
static FF hash_internal(std::span< const FF > input, FF iv)
Use the sponge to hash an input vector with a custom IV.
static State permutation(Builder *builder, const State &input)
Circuit form of Poseidon2 permutation from https://eprint.iacr.org/2023/323.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept