10#include <botan/internal/keccak_perm.h>
12#include <botan/internal/keccak_perm_round.h>
13#include <botan/internal/sponge_processing.h>
15#if defined(BOTAN_HAS_CPUID)
16 #include <botan/internal/cpuid.h>
22#if defined(BOTAN_HAS_KECCAK_PERM_AVX512)
28#if defined(BOTAN_HAS_KECCAK_PERM_BMI2)
62 const uint64_t start_of_padding = (m_padding.padding | uint64_t(1) << m_padding.bit_len);
85#if defined(BOTAN_HAS_KECCAK_PERM_AVX512)
87 return permute_avx512();
91#if defined(BOTAN_HAS_KECCAK_PERM_BMI2)
93 return permute_bmi2();
99 for(
size_t i = 0; i != 24; i += 2) {
#define BOTAN_DEBUG_ASSERT(expr)
static std::optional< std::string > check(CPUID::Feature feat)
static bool has(CPUID::Feature feat)
void squeeze(std::span< uint8_t > output)
Expand output data from the current Keccak state.
std::string provider() const
void absorb(std::span< const uint8_t > input)
Absorb input data into the Keccak sponge.
void finish()
Add final padding (as provided in the constructor) and permute.
static constexpr size_t word_bytes
constexpr size_t byte_rate() const
BOTAN_FORCE_INLINE void Keccak_Permutation_round(W T[25], const W A[25], uint64_t RC)
void squeeze_from_sponge(SpongeT &sponge, std::span< uint8_t > output, const detail::PermutationFn auto &permutation_fn)
constexpr uint64_t KECCAK_RC[24]
void absorb_into_sponge(SpongeT &sponge, std::span< const uint8_t > input, const detail::PermutationFn auto &permutation_fn)