Skip to content

Commit 100e79f

Browse files
committed
wolfcrypt/src/aes.c: add _TI_CRYPT and _RISCV_ASM fallthrough definitions for Aes{En,de}crypt_preFetchOpt.
1 parent 5a72a37 commit 100e79f

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

wolfcrypt/src/aes.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ block cipher mechanism that uses n-bit binary string parameter key with 128-bits
9191

9292
#if defined(WOLFSSL_TI_CRYPT)
9393
#include <wolfcrypt/src/port/ti/ti-aes.c>
94+
95+
#define AesEncrypt_preFetchOpt(aes, inBlock, outBlock, do_preFetch) \
96+
wc_AesEncryptDirect(aes, outBlock, inBlock)
97+
#define AesDecrypt_preFetchOpt(aes, inBlock, outBlock, do_preFetch) \
98+
wc_AesDecryptDirect(aes, outBlock, inBlock)
9499
#else
95100

96101

@@ -7279,7 +7284,6 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
72797284
#endif /* NEED_AES_CTR_SOFT */
72807285

72817286
#endif /* WOLFSSL_AES_COUNTER */
7282-
#endif /* !WOLFSSL_RISCV_ASM */
72837287

72847288
#ifndef WC_AES_HAVE_PREFETCH_ARG
72857289
#ifndef AesEncrypt_preFetchOpt
@@ -7292,6 +7296,15 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
72927296
#endif
72937297
#endif
72947298

7299+
#else /* WOLFSSL_RISCV_ASM */
7300+
7301+
#define AesEncrypt_preFetchOpt(aes, inBlock, outBlock, do_preFetch) \
7302+
wc_AesEncryptDirect(aes, outBlock, inBlock)
7303+
#define AesDecrypt_preFetchOpt(aes, inBlock, outBlock, do_preFetch) \
7304+
wc_AesDecryptDirect(aes, outBlock, inBlock)
7305+
7306+
#endif /* WOLFSSL_RISCV_ASM */
7307+
72957308
/*
72967309
* The IV for AES GCM and CCM, stored in struct Aes's member reg, is comprised
72977310
* of two parts in order:

0 commit comments

Comments
 (0)