Skip to content

Commit 39987a9

Browse files
committed
wolfcrypt/src/aes.c, wolfcrypt/src/cmac.c, wolfssl/wolfcrypt/aes.h, wolfssl/wolfcrypt/types.h: optimizations to mitigate performance regressions from 299e7bd (#9783):
* add prefetch_ptr flag argument to AesEncrypt_C() and AesDecrypt_C(), and call PreFetchTe() and PreFetchSBox() only if *prefetch_ptr is zero, whereupon it is set to 1; * when C implementations are available, add prefetch_ptr arg to wc_AesEncrypt() and wc_AesDecrypt(), and pass it through; * in functions that directly call the AES block encryption methods, opportunistically inhibit prefetch on all but the first call; * move AES-specific code in wc_CmacUpdate() in cmac.c to wc_local_CmacUpdateAes() in aes.c to let it use conditional prefetching; * add WC_ARG_NOT_NULL(), WC_ARGS_NOT_NULL(), and WC_ALL_ARGS_NOT_NULL attribute abstractions.
1 parent 6656695 commit 39987a9

5 files changed

Lines changed: 289 additions & 56 deletions

File tree

.wolfssl_known_macro_extras

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ __clang_major__
10941094
__cplusplus
10951095
__ghc__
10961096
__ghs__
1097+
__has_attribute
10971098
__hpux__
10981099
__i386
10991100
__i386__

0 commit comments

Comments
 (0)