From 10e2aebeb3c21ed30e77167a49adca2b5ac4755d Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Wed, 18 Apr 2018 18:47:11 -0400 Subject: Add AVX2 version of ChaCha --- src/lib/stream/chacha/chacha.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/stream/chacha/chacha.h') diff --git a/src/lib/stream/chacha/chacha.h b/src/lib/stream/chacha/chacha.h index 346e25c28..390c3b788 100644 --- a/src/lib/stream/chacha/chacha.h +++ b/src/lib/stream/chacha/chacha.h @@ -1,6 +1,6 @@ /* * ChaCha20 -* (C) 2014 Jack Lloyd +* (C) 2014,2018 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ @@ -58,12 +58,16 @@ class BOTAN_PUBLIC_API(2,0) ChaCha final : public StreamCipher void initialize_state(); - void chacha_x4(uint8_t output[64*4], uint32_t state[16], size_t rounds); + void chacha_x8(uint8_t output[64*8], uint32_t state[16], size_t rounds); #if defined(BOTAN_HAS_CHACHA_SSE2) void chacha_sse2_x4(uint8_t output[64*4], uint32_t state[16], size_t rounds); #endif +#if defined(BOTAN_HAS_CHACHA_AVX2) + void chacha_avx2_x8(uint8_t output[64*8], uint32_t state[16], size_t rounds); +#endif + size_t m_rounds; secure_vector m_key; secure_vector m_state; -- cgit v1.2.3