Skip to content

[crypto, stm32wb_aes, endian] Implement stm32wb crypto driver#15

Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:crypto
Mar 14, 2026
Merged

[crypto, stm32wb_aes, endian] Implement stm32wb crypto driver#15
AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano:crypto

Conversation

@AlexLanzano
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 14, 2026 20:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a new generic crypto abstraction in wolfHAL and wires in an STM32WB AES hardware-accelerator driver (plus test harness support and unit tests), enabling boards to expose crypto algorithms via an ops-table dispatch model.

Changes:

  • Add generic whal_Crypto device type with ops-table dispatch (crypto.h/crypto.c) and document driver integration.
  • Implement STM32WB AES accelerator driver supporting multiple AES modes and integrate it into the stm32wb55xx_nucleo board.
  • Extend the test framework with WHAL_SKIP() and add crypto + endian tests (host + hardware harness).

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wolfHAL/wolfHAL.h Exposes crypto APIs via umbrella header.
wolfHAL/regmap.h Adds register read/write helpers used by AES driver.
wolfHAL/platform/st/stm32wb55xx.h Adds AES1 device + clock macros for STM32WB55.
wolfHAL/endian.h Adds BE32 load/store helpers for register/key/IV formatting.
wolfHAL/crypto/stm32wb_aes.h Declares STM32WB AES driver interface and config.
wolfHAL/crypto/crypto.h Introduces generic crypto device/driver API + args structs.
src/crypto/crypto.c Implements generic crypto init/deinit/op dispatch.
src/crypto/stm32wb_aes.c Implements STM32WB AES hardware operations (ECB/CBC/CTR/GCM/GMAC/CCM).
boards/stm32wb55xx_nucleo/board.h Adds crypto op enum + global crypto device declaration.
boards/stm32wb55xx_nucleo/board.c Wires AES device + ops table; init/deinit crypto in board lifecycle.
boards/stm32wb55xx_nucleo/Makefile.inc Enables crypto tests and pulls crypto sources into board build.
tests/test.h Adds skip support and skipped counters to test framework.
tests/main.c Enables crypto test suite when configured.
tests/crypto/test_crypto.c Adds AES mode tests with known-answer vectors.
tests/core/test_endian.c Adds host-side unit tests for endian helpers.
tests/core/main.c Runs endian tests and tracks skipped counts.
tests/core/Makefile Builds endian unit test file in host core tests.
tests/README.md Updates core test documentation to include endian.
docs/writing_a_driver.md Documents crypto driver model (ops table) and board integration.
docs/adding_a_test.md Documents WHAL_SKIP() test macro.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@AlexLanzano AlexLanzano merged commit 74599d0 into wolfSSL:main Mar 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants