|
| template<size_t out_len, bool is_variable_length> |
| static std::array< FF, out_len > | hash_internal (std::span< FF > input) |
| | Use the sponge to hash an input string.
|
| |
|
template<size_t out_len> |
| static std::array< FF, out_len > | hash_fixed_length (std::span< FF > input) |
| |
|
static FF | hash_fixed_length (std::span< FF > input) |
| |
|
template<size_t out_len> |
| static std::array< FF, out_len > | hash_variable_length (std::span< FF > input) |
| |
|
static FF | hash_variable_length (std::span< FF > input) |
| |
template<typename
FF, size_t rate, size_t capacity, size_t t, typename Permutation>
class crypto::FieldSponge< FF, rate, capacity, t, Permutation >
Implements a cryptographic sponge over prime fields. Implements the sponge specification from the Community Cryptographic Specification Project see https://github.com/C2SP/C2SP/blob/792c1254124f625d459bfe34417e8f6bdd02eb28/poseidon-sponge.md (Note: this spec was not accepted into the C2SP repo, we might want to reference something else!)
Note: If we ever use this sponge class for more than 1 hash functions, we should move this out of poseidon2 and into its own directory
- Template Parameters
-
| FF | |
| rate | |
| capacity | |
| t | |
| Permutation | |