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
8 changes: 0 additions & 8 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ ifeq ($(ARCH),AARCH64)
ARCH_FLAGS=-mstrict-align
CFLAGS+=$(ARCH_FLAGS) -DWOLFSSL_ARMASM -DWOLFSSL_ARMASM_INLINE -DWC_HASH_DATA_ALIGNMENT=8 -DWOLFSSL_AARCH64_PRIVILEGE_MODE
WOLFCRYPT_OBJS += $(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/cpuid.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha256.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha512.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-aes.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha512-asm_c.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha3-asm_c.o
endif
Expand Down Expand Up @@ -284,7 +281,6 @@ ifeq ($(CORTEX_A5),1)
else
MATH_OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/sp_arm32.o
ifneq ($(NO_ARM_ASM),1)
OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha256.o
OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-32-sha256-asm.o
OBJS+=$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-32-sha256-asm_c.o
CFLAGS+=-DWOLFSSL_SP_ARM32_ASM -DWOLFSSL_ARMASM -DWOLFSSL_ARMASM_NO_HW_CRYPTO \
Expand All @@ -296,10 +292,6 @@ else
OBJS+=src/boot_arm.o
ifneq ($(NO_ARM_ASM),1)
CORTEXM_ARM_EXTRA_OBJS= \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-aes.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-chacha.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha256.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/armv8-sha512.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/thumb2-aes-asm.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/thumb2-aes-asm_c.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/port/arm/thumb2-sha256-asm.o \
Expand Down
3 changes: 1 addition & 2 deletions config/examples/stm32c0-lms-8-10-1.config
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ CFLAGS_EXTRA+=-DUSE_SLOW_SHA256
#Partition: Boot: 10KB, App, 10KB
WOLFBOOT_PARTITION_SIZE?=0x2800
WOLFBOOT_SECTOR_SIZE?=0x800
#Max WOLFBOOT size is 10KB
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08002800
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x085000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08005000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x08007800

#Example debugging partition for larger wolfBoot
Expand Down
7 changes: 3 additions & 4 deletions config/examples/stm32c0.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ CFLAGS_EXTRA+=-DUSE_SLOW_SHA256
# Requires using the STM32CubeProgrammer to set FLASH_SECR -> SEC_SIZE pages
#CFLAGS_EXTRA+=-DFLASH_SECURABLE_MEMORY_SUPPORT


#Partition: Boot: 10KB, App, 10KB
#Partition: Boot: 12KB, App, 8KB
WOLFBOOT_PARTITION_SIZE?=0x2000
WOLFBOOT_SECTOR_SIZE?=0x800
#Max WOLFBOOT size is 10KB
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08002800
WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08003000
WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08005000
WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x08007800


#Example debugging partition for larger wolfBoot
#Partition: Boot: 22KB, App, 4K
#DEBUG?=1
Expand Down
2 changes: 1 addition & 1 deletion lib/wolfHSM
Submodule wolfHSM updated 66 files
+11 −4 .github/workflows/build-and-run-examples.yml
+7 −2 .github/workflows/clang-format-check.yml
+53 −0 .github/workflows/code-coverage.yml
+5 −0 .gitignore
+27 −1 ChangeLog.md
+1 −1 README.md
+230 −0 benchmark/bench_modules/wh_bench_mod_aes.c
+22 −0 benchmark/bench_modules/wh_bench_mod_all.h
+96 −0 benchmark/bench_modules/wh_bench_mod_hkdf.c
+6 −2 benchmark/bench_modules/wh_bench_mod_sha2.c
+1 −0 benchmark/config/wolfhsm_cfg.h
+60 −42 benchmark/wh_bench.c
+2 −2 benchmark/wh_bench_main.c
+1 −1 benchmark/wh_bench_ops.h
+18 −1 examples/demo/client/wh_demo_client_all.c
+154 −10 examples/demo/client/wh_demo_client_crypto.c
+4 −0 examples/demo/client/wh_demo_client_crypto.h
+167 −62 examples/demo/client/wh_demo_client_keywrap.c
+1 −1 examples/demo/client/wh_demo_client_keywrap.h
+7 −0 examples/posix/wh_posix_client/Makefile
+1 −0 examples/posix/wh_posix_client/user_settings.h
+1 −1 examples/posix/wh_posix_client/wh_posix_client.c
+1 −1 examples/posix/wh_posix_client/wolfhsm_cfg.h
+6 −0 examples/posix/wh_posix_server/Makefile
+2 −0 examples/posix/wh_posix_server/wolfhsm_cfg.h
+19 −5 port/posix/posix_transport_tcp.c
+3 −3 src/wh_client.c
+510 −46 src/wh_client_crypto.c
+97 −0 src/wh_client_cryptocb.c
+2 −0 src/wh_client_keywrap.c
+139 −0 src/wh_message_crypto.c
+1 −1 src/wh_nvm.c
+29 −33 src/wh_nvm_flash.c
+698 −0 src/wh_nvm_flash_log.c
+6 −8 src/wh_server_cert.c
+432 −1 src/wh_server_crypto.c
+9 −7 src/wh_server_keystore.c
+75 −31 src/wh_server_nvm.c
+37 −2 test/Makefile
+64 −0 test/README.md
+4 −0 test/config/wolfhsm_cfg.h
+12 −2 test/wh_test.c
+3 −0 test/wh_test.h
+7 −15 test/wh_test_cert.c
+4 −2 test/wh_test_cert.h
+47 −45 test/wh_test_check_struct_padding.c
+110 −57 test/wh_test_clientserver.c
+92 −0 test/wh_test_common.c
+32 −0 test/wh_test_common.h
+365 −109 test/wh_test_crypto.c
+129 −68 test/wh_test_keywrap.c
+2 −1 test/wh_test_keywrap.h
+45 −8 test/wh_test_nvm_flash.c
+6 −15 test/wh_test_server_img_mgr.c
+4 −2 test/wh_test_server_img_mgr.h
+26 −11 test/wh_test_wolfcrypt_test.c
+0 −3 tools/whnvmtool/user_settings.h
+6 −6 wolfhsm/wh_client.h
+110 −0 wolfhsm/wh_client_crypto.h
+90 −1 wolfhsm/wh_message_crypto.h
+3 −3 wolfhsm/wh_nvm.h
+2 −2 wolfhsm/wh_nvm_flash.h
+100 −0 wolfhsm/wh_nvm_flash_log.h
+1 −5 wolfhsm/wh_server.h
+8 −0 wolfhsm/wh_server_crypto.h
+4 −5 wolfhsm/wh_settings.h
2 changes: 1 addition & 1 deletion lib/wolfTPM
Submodule wolfTPM updated 124 files
2 changes: 1 addition & 1 deletion lib/wolfssl
Submodule wolfssl updated 493 files
3 changes: 1 addition & 2 deletions options.mk
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ XMSS_EXTRA=\
-D"WOLFSSL_XMSS_VERIFY_ONLY" -D"WOLFSSL_XMSS_MAX_HEIGHT=32"

ML_DSA_OBJS=\
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/dilithium.o \
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/memory.o
$(WOLFBOOT_LIB_WOLFSSL)/wolfcrypt/src/dilithium.o

ML_DSA_EXTRA=\
-D"ML_DSA_IMAGE_SIGNATURE_SIZE"=$(IMAGE_SIGNATURE_SIZE) \
Expand Down
28 changes: 14 additions & 14 deletions tools/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -961,40 +961,40 @@ test-all: clean


test-size-all:
make test-size SIGN=NONE LIMIT=4854 NO_ARM_ASM=1
make test-size SIGN=NONE LIMIT=4896 NO_ARM_ASM=1
make keysclean
make test-size SIGN=ED25519 LIMIT=11458 NO_ARM_ASM=1
make test-size SIGN=ED25519 LIMIT=11548 NO_ARM_ASM=1
make keysclean
make test-size SIGN=ECC256 LIMIT=18656 NO_ARM_ASM=1
make clean
make test-size SIGN=ECC256 NO_ASM=1 LIMIT=13566 NO_ARM_ASM=1
make test-size SIGN=ECC256 NO_ASM=1 LIMIT=13700 NO_ARM_ASM=1
make keysclean
make test-size SIGN=RSA2048 LIMIT=11302 NO_ARM_ASM=1
make test-size SIGN=RSA2048 LIMIT=11396 NO_ARM_ASM=1
make clean
make test-size SIGN=RSA2048 NO_ASM=1 LIMIT=11882 NO_ARM_ASM=1
make test-size SIGN=RSA2048 NO_ASM=1 LIMIT=11976 NO_ARM_ASM=1
make keysclean
make test-size SIGN=RSA4096 LIMIT=11586 NO_ARM_ASM=1
make test-size SIGN=RSA4096 LIMIT=11680 NO_ARM_ASM=1
make clean
make test-size SIGN=RSA4096 NO_ASM=1 LIMIT=12166 NO_ARM_ASM=1
make test-size SIGN=RSA4096 NO_ASM=1 LIMIT=12260 NO_ARM_ASM=1
make keysclean
make test-size SIGN=ECC384 LIMIT=18616 NO_ARM_ASM=1
make clean
make test-size SIGN=ECC384 NO_ASM=1 LIMIT=14942 NO_ARM_ASM=1
make test-size SIGN=ECC384 NO_ASM=1 LIMIT=15076 NO_ARM_ASM=1
make keysclean
make test-size SIGN=ED448 LIMIT=13526 NO_ARM_ASM=1
make test-size SIGN=ED448 LIMIT=13616 NO_ARM_ASM=1
make keysclean
make test-size SIGN=RSA3072 LIMIT=11444 NO_ARM_ASM=1
make test-size SIGN=RSA3072 LIMIT=11536 NO_ARM_ASM=1
make clean
make test-size SIGN=RSA3072 NO_ASM=1 LIMIT=11988 NO_ARM_ASM=1
make test-size SIGN=RSA3072 NO_ASM=1 LIMIT=12080 NO_ARM_ASM=1
make keysclean
make test-size SIGN=LMS LMS_LEVELS=2 LMS_HEIGHT=5 LMS_WINTERNITZ=8 \
WOLFBOOT_SMALL_STACK=0 IMAGE_SIGNATURE_SIZE=2644 \
IMAGE_HEADER_SIZE?=5288 LIMIT=7546 NO_ARM_ASM=1
IMAGE_HEADER_SIZE?=5288 LIMIT=7620 NO_ARM_ASM=1
make keysclean
make test-size SIGN=XMSS XMSS_PARAMS='XMSS-SHA2_10_256' \
IMAGE_SIGNATURE_SIZE=2500 IMAGE_HEADER_SIZE?=4096 \
LIMIT=8322 NO_ARM_ASM=1
LIMIT=8408 NO_ARM_ASM=1
make keysclean
make clean
make test-size SIGN=ML_DSA ML_DSA_LEVEL=2 LIMIT=18880 \
make test-size SIGN=ML_DSA ML_DSA_LEVEL=2 LIMIT=19246 \
IMAGE_SIGNATURE_SIZE=2420 IMAGE_HEADER_SIZE?=8192