Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ endif
endif
endif

if BUILD_RISCV_ASM
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/port/riscv/riscv-64-aes.c
endif BUILD_RISCV_ASM

if BUILD_SHA
src_libwolfssl@LIBSUFFIX@_la_SOURCES += wolfcrypt/src/sha.c
endif
Expand Down
4 changes: 2 additions & 2 deletions wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(Aes* aes, const byte* inBlock,
/* implemented in wolfcrypt/src/port/psa/psa_aes.c */

#elif defined(WOLFSSL_RISCV_ASM)
/* implemented in wolfcrypt/src/port/risc-v/riscv-64-aes.c */
/* implemented in wolfcrypt/src/port/riscv/riscv-64-aes.c */

#elif defined(WOLFSSL_SILABS_SE_ACCEL)
/* implemented in wolfcrypt/src/port/silabs/silabs_aes.c */
Expand Down Expand Up @@ -12892,7 +12892,7 @@ int wc_AesCcmCheckTagSize(int sz)
}

#if defined(WOLFSSL_RISCV_ASM)
/* implementation located in wolfcrypt/src/port/risc-v/riscv-64-aes.c */
/* implementation located in wolfcrypt/src/port/riscv/riscv-64-aes.c */

#elif defined(HAVE_COLDFIRE_SEC)
#error "Coldfire SEC doesn't currently support AES-CCM mode"
Expand Down
14 changes: 14 additions & 0 deletions wolfcrypt/src/port/riscv/riscv-64-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

#include <wolfssl/wolfcrypt/libwolfssl_sources.h>

#if FIPS_VERSION3_GE(2,0,0)
/* set NO_WRAPPERS before headers, use direct internal f()s not wrappers */
#define FIPS_NO_WRAPPERS
#endif

#include <wolfssl/wolfcrypt/port/riscv/riscv-64-asm.h>

#if !defined(NO_AES)
Expand All @@ -36,6 +41,15 @@

#ifdef WOLFSSL_RISCV_ASM

#if FIPS_VERSION3_GE(6,0,0)
const unsigned int wolfCrypt_FIPS_aes_ro_sanity[2] =
{ 0x1a2b3c4d, 0x00000002 };
int wolfCrypt_FIPS_AES_sanity(void)
{
return 0;
}
#endif

/* Copy a 16-byte value from in to out.
*
* @param [out] out 16-byte value destination.
Expand Down
Loading