[crypto, pka, stm32wb] Implement PKA interface and driver for stm32wb#43
Open
AlexLanzano wants to merge 1 commit into
Open
[crypto, pka, stm32wb] Implement PKA interface and driver for stm32wb#43AlexLanzano wants to merge 1 commit into
AlexLanzano wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a public-key accelerator (PKA) “math primitives” API to wolfHAL and provides an STM32WB backend/driver, with board integration and a new hardware test suite for RSA-1024 raw primitives.
Changes:
- Introduces a new generic PKA API (
wolfHAL/crypto/pka.h) and STM32WB PKA driver interface/implementation. - Wires STM32WB55 Nucleo board support (base address, clock gate, init/deinit, build flags).
- Adds PKA hardware tests plus vector generation updates.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| wolfHAL/platform/st/stm32wb55xx.h | Adds STM32WB55 PKA base/driver macros and RCC gate macro. |
| wolfHAL/crypto/stm32wb_pka.h | New STM32WB PKA driver header (lifecycle + primitive declarations). |
| wolfHAL/crypto/pka.h | New generic public-key math primitive API header. |
| wolfHAL/crypto/crypto.h | Adds a note about where public-key primitives live (needs fix per comments). |
| src/crypto/stm32wb_pka.c | New STM32WB PKA driver implementation and direct mapping for whal_Pka_*. |
| docs/writing_a_driver.md | Documents the new “Math Primitives” pattern and PKA design. |
| boards/stm32wb55xx_nucleo/board.mk | Enables pka test and defines WHAL_CFG_STM32WB_PKA_DIRECT_API_MAPPING. |
| boards/stm32wb55xx_nucleo/board.h | Adds WHAL_CFG_STM32WB_PKA_DEV initializer. |
| boards/stm32wb55xx_nucleo/board.c | Enables the PKA clock gate and calls PKA Init/Deinit in board bring-up. |
| tests/main.c | Adds conditional registration/execution of whal_Test_Pka(). |
| tests/crypto/test_pka.c | New RSA-1024 KAT + round-trip tests using whal_Pka_* primitives. |
| tests/crypto/gen_test_vectors.py | Adds RSA raw primitive vectors generation (needs reference naming fix per comments). |
💡 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.