33template <
typename FF,
size_t rate,
size_t capacity,
size_t t,
typename Permutation>
class FieldSponge {
47 for (
size_t i = 0; i < rate; ++i) {
52 Permutation::permutation_inplace(
state);
87 const size_t in_len = input.size();
103 const size_t in_len = input.size();
104 for (
size_t i = 0; i < in_len; ++i) {
Implements a cryptographic sponge over prime fields. Sponge construction follows the Duplex Sponge mo...
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.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept