Revert "Improve AES-GCM code for Intel AVX1 and AVX2"

This commit is contained in:
toddouska 2018-01-19 15:12:08 -08:00 committed by GitHub
parent 085d3dae14
commit f06abdb3ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2651 additions and 3270 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5923,7 +5923,7 @@ int aesgcm_test(void)
return -4309;
#endif /* BENCH_AESGCM_LARGE */
#ifdef ENABLE_NON_12BYTE_IV_TEST
#if !defined(HAVE_FIPS) && !defined(STM32_CRYPTO)
/* Variable IV length test */
for (ivlen=0; ivlen<(int)sizeof(k1); ivlen++) {
/* AES-GCM encrypt and decrypt both use AES encrypt internally */
@ -5963,29 +5963,6 @@ int aesgcm_test(void)
return -4313;
}
#ifdef BENCH_AESGCM_LARGE
/* Variable plain text length test */
for (plen=1; plen<BENCH_AESGCM_LARGE; plen++) {
/* AES-GCM encrypt and decrypt both use AES encrypt internally */
result = wc_AesGcmEncrypt(&enc, large_output, large_input,
plen, iv1, sizeof(iv1), resultT,
sizeof(resultT), a, sizeof(a));
#if defined(WOLFSSL_ASYNC_CRYPT)
result = wc_AsyncWait(result, &enc.asyncDev, WC_ASYNC_FLAG_NONE);
#endif
if (result != 0)
return -4314;
result = wc_AesGcmDecrypt(&enc, large_outdec, large_output,
plen, iv1, sizeof(iv1), resultT,
sizeof(resultT), a, sizeof(a));
#if defined(WOLFSSL_ASYNC_CRYPT)
result = wc_AsyncWait(result, &enc.asyncDev, WC_ASYNC_FLAG_NONE);
#endif
if (result != 0)
return -4315;
}
#else
/* Variable plain text length test */
for (plen=1; plen<(int)sizeof(p); plen++) {
/* AES-GCM encrypt and decrypt both use AES encrypt internally */
@ -6004,7 +5981,6 @@ int aesgcm_test(void)
if (result != 0)
return -4315;
}
#endif /* BENCH_AESGCM_LARGE */
/* test with IV != 12 bytes */
#ifdef ENABLE_NON_12BYTE_IV_TEST