From e1a0f851e2848d428ec5c30eaaea67e2691fe4bb Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 28 Nov 2017 14:49:47 +0100 Subject: curve25519: explictly depend on AS_AVX Signed-off-by: Jason A. Donenfeld --- src/crypto/curve25519.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/crypto/curve25519.c b/src/crypto/curve25519.c index 7b40b61..6dbd74b 100644 --- a/src/crypto/curve25519.c +++ b/src/crypto/curve25519.c @@ -23,7 +23,7 @@ static __always_inline void normalize_secret(u8 secret[CURVE25519_POINT_SIZE]) secret[31] |= 64; } -#if defined(CONFIG_X86_64) +#if defined(CONFIG_X86_64) && defined(CONFIG_AS_AVX) #include #include #include @@ -1638,7 +1638,7 @@ static const u8 null_point[CURVE25519_POINT_SIZE] = { 0 }; bool curve25519(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]) { bool ret = true; -#if defined(CONFIG_X86_64) +#if defined(CONFIG_X86_64) && defined(CONFIG_AS_AVX) if (curve25519_use_avx && irq_fpu_usable()) { kernel_fpu_begin(); curve25519_sandy2x(mypublic, secret, basepoint); @@ -1666,7 +1666,7 @@ bool curve25519_generate_public(u8 pub[CURVE25519_POINT_SIZE], const u8 secret[C if (unlikely(!crypto_memneq(secret, null_point, CURVE25519_POINT_SIZE))) return false; -#if defined(CONFIG_X86_64) +#if defined(CONFIG_X86_64) && defined(CONFIG_AS_AVX) if (curve25519_use_avx && irq_fpu_usable()) { kernel_fpu_begin(); curve25519_sandy2x_base(pub, secret); -- cgit v1.2.3