Botan 3.14.1
Crypto and TLS for C&
keccak_perm_bmi2.cpp
Go to the documentation of this file.
1/*
2* Keccak-FIPS
3* (C) 2019 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#include <botan/internal/keccak_perm.h>
9
10#include <botan/internal/isa_extn.h>
11#include <botan/internal/keccak_perm_round.h>
12
13namespace Botan {
14
15void BOTAN_FN_ISA_BMI2 Keccak_Permutation::permute_bmi2() {
16 uint64_t T[25];
17
18 for(size_t i = 0; i != 24; i += 2) {
19 Keccak_Permutation_round(T, state().data(), KECCAK_RC[i + 0]);
20 Keccak_Permutation_round(state().data(), T, KECCAK_RC[i + 1]);
21 }
22}
23
24} // namespace Botan
constexpr auto & state()
Definition sponge.h:63
BOTAN_FORCE_INLINE void Keccak_Permutation_round(W T[25], const W A[25], uint64_t RC)
constexpr uint64_t KECCAK_RC[24]