Skip to content

Commit

Permalink
Remove AESGCM and AEGIS test for AVX
Browse files Browse the repository at this point in the history
  • Loading branch information
enclave-alistair committed Mar 12, 2024
1 parent 6d261b0 commit 186c557
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/libsodium/crypto_aead/aegis256/aead_aegis256.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "aegis256_armcrypto.h"
#endif

#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
#if defined(HAVE_WMMINTRIN_H)
#include "aegis256_aesni.h"
#endif

Expand Down Expand Up @@ -148,8 +148,8 @@ _crypto_aead_aegis256_pick_best_implementation(void)
}
#endif

#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
if (sodium_runtime_has_aesni() & sodium_runtime_has_avx()) {
#if defined(HAVE_WMMINTRIN_H)
if (sodium_runtime_has_aesni()) {
implementation = &aegis256_aesni_implementation;
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/libsodium/crypto_aead/aegis256/aegis256_aesni.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include "aegis256_aesni.h"

#ifdef __clang__
#pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
#pragma clang attribute push(__attribute__((target("aes"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("aes,avx")
#pragma GCC target("aes")
#endif

#include "private/sse2_64_32.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#if defined(HAVE_TMMINTRIN_H) && defined(HAVE_WMMINTRIN_H)

#ifdef __GNUC__
#pragma GCC target("avx,aes,pclmul")
#pragma GCC target("aes,pclmul")
#endif

#if !defined(_MSC_VER) || _MSC_VER < 1800
Expand Down Expand Up @@ -1003,7 +1003,7 @@ crypto_aead_aes256gcm_decrypt(unsigned char *m, unsigned long long *mlen_p, unsi
int
crypto_aead_aes256gcm_is_available(void)
{
return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni() & sodium_runtime_has_avx();
return sodium_runtime_has_pclmul() & sodium_runtime_has_aesni();
}

#endif

0 comments on commit 186c557

Please sign in to comment.