aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/chacha20/chacha20-x86_64-glue.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-18 02:18:47 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-18 04:21:16 +0200
commit7905a1f5dff38cc30af873461f083f30893adcbe (patch)
tree44e5b8aec599b509df0df1dc99d13d5e68d54022 /src/crypto/zinc/chacha20/chacha20-x86_64-glue.h
parentchacha20-x86_64: more limited cascade (diff)
downloadwireguard-monolithic-historical-7905a1f5dff38cc30af873461f083f30893adcbe.tar.xz
wireguard-monolithic-historical-7905a1f5dff38cc30af873461f083f30893adcbe.zip
crypto: allow for disabling simd in zinc modules
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20-x86_64-glue.h')
-rw-r--r--src/crypto/zinc/chacha20/chacha20-x86_64-glue.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-x86_64-glue.h b/src/crypto/zinc/chacha20/chacha20-x86_64-glue.h
index f3a7456..912bded 100644
--- a/src/crypto/zinc/chacha20/chacha20-x86_64-glue.h
+++ b/src/crypto/zinc/chacha20/chacha20-x86_64-glue.h
@@ -60,7 +60,8 @@ static inline bool chacha20_arch(u8 *dst, const u8 *src, const size_t len,
const u32 key[8], const u32 counter[4],
simd_context_t *simd_context)
{
- if (len <= CHACHA20_BLOCK_SIZE || !simd_use(simd_context))
+ if (!chacha20_use_ssse3 || len <= CHACHA20_BLOCK_SIZE ||
+ !simd_use(simd_context))
return false;
#ifdef CONFIG_AS_AVX512