Repository navigation
Conversation
|
There was a problem hiding this comment.
🔵 Needs a closer look
On-target validation is needed because wolfCrypt seeding and wolfIP_getrandom share an RNG across preemptive FreeRTOS tasks under SINGLE_THREADED settings, a combination not covered by reported hardware tests.
No open issues 🎉
What changed in this PR
Adds opt-in hardware cryptography to the STM32H563 wolfIP port, building on STM32H573I-DK support from #205.
Changes:
- Enables hardware AES, HASH and RNG-backed Hash-DRBG while retaining software ECC.
- Adds build validation, CMSIS include paths and configuration-change rebuild tracking.
- Documents board selection, hardware-crypto usage and measured handshake times.
| File | Description |
|---|---|
src/port/stm32h563/user_settings.h |
Selects hardware crypto and Hash-DRBG when enabled. |
src/port/stm32h563/README.md |
Documents DK builds, hardware requirements and performance. |
src/port/stm32h563/Makefile |
Adds hardware-crypto flags, dependencies, checks and rebuild stamps. |
src/port/stm32h563/main.c |
Selects DK-specific console and Ethernet pins. |
src/port/stm32h563/.gitignore |
Ignores board and hardware-crypto build stamps. |
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #206
Scan targets checked: wolfip-src, wolfip-bugs
Not reviewed (no scan target covers them): src/port/stm32h563/.gitignore, src/port/stm32h563/Makefile, src/port/stm32h563/README.md
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
Adds an opt-in
ENABLE_HWCRYPTO=1build option to the STM32H563 port for the STM32H573I-DK. It runs TLS crypto on the STM32H573 AES, HASH and RNG peripherals through wolfCrypt's register-level STM32 port (WOLFSSL_STM32_BARE,wolfcrypt/src/port/st/stm32.c). No wolfSSL change is needed.Depends on #205 (
BOARD=stm32h573i_dk); this branch is stacked on it.What it changes
Makefile:ENABLE_HWCRYPTO=1addsstm32.cand passesWOLFSSL_STM32_HWCRYPTO,STM32H573xxand the STM32CubeH5 CMSIS include paths to the wolfSSL objects only.BOARD=stm32h573i_dk, because the STM32H563 has no AES peripheral.STM32CUBE_FW_H5defaults to the newest tree under~/STM32Cube/Repository.user_settings.h: underWOLFSSL_STM32_HWCRYPTO, enablesSTM32_CRYPTO,STM32_HASHandSTM32_RNGwith a Hash-DRBG seeded by the hardware RNG, in place ofCUSTOM_RAND_GENERATE_BLOCK. ECC stays on the SP Cortex-M assembly, which completes the handshake faster than the PKA.README.md: a Hardware Crypto section with the build command and measured handshake times.Builds without
ENABLE_HWCRYPTOare byte-identical to before. Checked for the NUCLEO default, the DK default, the full TLS/HTTPS/SSH/MQTT builds for both boards, andTZEN=1.Hardware / test status
Validated on the STM32H573I-DK (TZEN=0, bench LAN, DHCP) with
ENABLE_HWCRYPTO=1:openssl s_client).infoworked, and an MQTT broker publish/subscribe on 8883 went through.Scope
WOLFSSL_STM32_PKAworks with this option but is left off, because it is slower than the SP assembly for P-256 here.TZEN=1is not supported: the non-secure application would need wolfBoot to release the crypto peripherals.