Skip to content

[crypto, pka, stm32wb] Implement PKA interface and driver for stm32wb#43

Open
AlexLanzano wants to merge 1 commit into
wolfSSL:mainfrom
AlexLanzano:pka
Open

[crypto, pka, stm32wb] Implement PKA interface and driver for stm32wb#43
AlexLanzano wants to merge 1 commit into
wolfSSL:mainfrom
AlexLanzano:pka

Conversation

@AlexLanzano
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 25, 2026 14:54
Copy link
Copy Markdown

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

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.

Comment thread src/crypto/stm32wb_pka.c
Comment thread src/crypto/stm32wb_pka.c
Comment thread src/crypto/stm32wb_pka.c Outdated
Comment thread wolfHAL/crypto/crypto.h Outdated
Comment thread boards/stm32wb55xx_nucleo/board.h Outdated
Comment thread tests/crypto/gen_test_vectors.py
Comment thread tests/crypto/gen_test_vectors.py Outdated
Copy link
Copy Markdown

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comment thread src/crypto/stm32wb_pka.c Outdated
Comment thread src/crypto/stm32wb_pka.c Outdated
Comment thread wolfHAL/crypto/stm32wb_pka.h
Copy link
Copy Markdown

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comment thread src/crypto/stm32wb_pka.c
Comment thread src/crypto/stm32wb_pka.c
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.

4 participants