Skip to content

Commit

Permalink
Undo AEGIS changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
enclave-alistair committed Mar 12, 2024
1 parent 186c557 commit e2064dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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_WMMINTRIN_H)
#if defined(HAVE_AVXINTRIN_H) && 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_WMMINTRIN_H)
if (sodium_runtime_has_aesni()) {
#if defined(HAVE_AVXINTRIN_H) && defined(HAVE_WMMINTRIN_H)
if (sodium_runtime_has_aesni() & sodium_runtime_has_avx()) {
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"))), apply_to = function)
#pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
#elif defined(__GNUC__)
#pragma GCC target("aes")
#pragma GCC target("aes,avx")
#endif

#include "private/sse2_64_32.h"
Expand Down

0 comments on commit e2064dd

Please sign in to comment.