Skip to content

Commit d284cee

Browse files
aidangarskedanielinux
authored andcommitted
Enable SHA3 on the secure wolfHSM server for the STM32H5 TrustZone port
1 parent 7f9f960 commit d284cee

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎include/user_settings.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,10 @@ extern int tolower(int c);
10471047
# endif
10481048
# ifndef WOLFSSL_SHA512
10491049
# define WOLFSSL_SHA512
1050+
# endif
1051+
/* The NS client's direct SHA3 requests need a SHA3-capable server */
1052+
# ifndef WOLFSSL_SHA3
1053+
# define WOLFSSL_SHA3
10501054
# endif
10511055
# endif /* WOLFCRYPT_TZ_WOLFHSM */
10521056
/* Match the keycache sizing the wolfHSM test suite is validated

‎options.mk‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,9 @@ ifeq ($(WOLFCRYPT_TZ_WOLFHSM),1)
13961396
ifneq ($(SIGN),ED25519)
13971397
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sha512.o
13981398
endif
1399+
ifneq ($(HASH),SHA3)
1400+
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sha3.o
1401+
endif
13991402
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/wc_encrypt.o
14001403
ifeq ($(ENCRYPT_WITH_AES128)$(ENCRYPT_WITH_AES256),)
14011404
WOLFCRYPT_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/aes.o

0 commit comments

Comments
 (0)