[crypto, stm32wb_aes, endian] Implement stm32wb crypto driver#15
Merged
AlexLanzano merged 1 commit intowolfSSL:mainfrom Mar 14, 2026
Merged
[crypto, stm32wb_aes, endian] Implement stm32wb crypto driver#15AlexLanzano merged 1 commit intowolfSSL:mainfrom
AlexLanzano merged 1 commit intowolfSSL:mainfrom
Conversation
There was a problem hiding this comment.
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_Cryptodevice 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.