7#include <botan/internal/salsa20.h>
9#include <botan/assert.h>
10#include <botan/internal/simd_avx512.h>
15void BOTAN_FN_ISA_AVX512 Salsa20::salsa20_avx512_x16(uint8_t output[64 * 16], uint32_t state[16],
size_t rounds) {
18 const SIMD_16x32 CTR_LO =
19 SIMD_16x32::splat(state[8]) + SIMD_16x32(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
31 SIMD_16x32 R08 = CTR_LO;
32 SIMD_16x32 R09 = CTR_HI;
40 for(
size_t r = 0; r != rounds / 2; ++r) {
101 SIMD_16x32::transpose(R00, R01, R02, R03, R04, R05, R06, R07, R08, R09, R10, R11, R12, R13, R14, R15);
103 R00.store_le(output);
104 R01.store_le(output + 64 * 1);
105 R02.store_le(output + 64 * 2);
106 R03.store_le(output + 64 * 3);
107 R04.store_le(output + 64 * 4);
108 R05.store_le(output + 64 * 5);
109 R06.store_le(output + 64 * 6);
110 R07.store_le(output + 64 * 7);
111 R08.store_le(output + 64 * 8);
112 R09.store_le(output + 64 * 9);
113 R10.store_le(output + 64 * 10);
114 R11.store_le(output + 64 * 11);
115 R12.store_le(output + 64 * 12);
116 R13.store_le(output + 64 * 13);
117 R14.store_le(output + 64 * 14);
118 R15.store_le(output + 64 * 15);
#define BOTAN_ASSERT(expr, assertion_made)
static BOTAN_FN_ISA_AVX512 void transpose(SIMD_16x32 &B0, SIMD_16x32 &B1, SIMD_16x32 &B2, SIMD_16x32 &B3)
SIMD_16x32 BOTAN_FN_ISA_AVX512 unsigned_lt(const SIMD_16x32 &other) const noexcept
static BOTAN_FN_ISA_AVX512 void zero_registers()
static BOTAN_FN_ISA_AVX512 SIMD_16x32 splat(uint32_t B)
BOTAN_FORCE_INLINE constexpr T rotl(T input)