Skip to content

CubeMX HW crypto-callback tests (cubeaes + cubecrypto)#16

Open
dgarske wants to merge 2 commits into
wolfSSL:mainfrom
dgarske:stm32_cubemx_aes_cb
Open

CubeMX HW crypto-callback tests (cubeaes + cubecrypto)#16
dgarske wants to merge 2 commits into
wolfSSL:mainfrom
dgarske:stm32_cubemx_aes_cb

Conversation

@dgarske

@dgarske dgarske commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds two CubeMX/HAL test targets that validate the wolfSSL STM32 crypto-callback device (companion wolfSSL PR) under WOLF_CRYPTO_CB_ONLY_AES / _ECC on the STM32U385.

Changes

  • src/main_cubeaes.c + cubeaes target: AES-GCM KATs (McGrew TC3/TC4) with a plaintext key via wc_Stm32_CubeAesRegister under WOLF_CRYPTO_CB_ONLY_AES.
  • src/main_cubecrypto.c + cubecrypto target: HW ECDSA sign + verify (normal P-256 key -> PKA), CCB-protected ECDSA, and AES-GCM, all through the callback under WOLF_CRYPTO_CB_ONLY_ECC + WOLF_CRYPTO_CB_ONLY_AES. Brings up the ST HAL PKA (hpka + HAL_PKA_Init) the PKA path needs.
  • Makefile / user_settings.h: the two targets + STM32_CUBE_AES_ONLY / STM32_CUBE_CRYPTO_ONLY presets; cubecrypto links the HAL PKA + CCB drivers.

Testing

On NUCLEO-U385RG-Q: make BOARD=u3 BUILD=cubemx TARGET=cubecrypto CONFIG=bare flash and TARGET=cubeaes both report Result: 0 (PASS). (CCB on-chip provisioning is a soft-pass under CB_ONLY_ECC -- it needs software keygen; CCB sign works with a pre-provisioned blob.)

@dgarske dgarske self-assigned this Jul 22, 2026
Copilot AI review requested due to automatic review settings July 22, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI left a comment

Copy link
Copy Markdown

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 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread STM32_Bare_Test/src/main_cubeaes.c
Comment thread STM32_Bare_Test/src/main_cubeaes.c
Comment thread STM32_Bare_Test/src/main_cubecrypto.c
Comment thread STM32_Bare_Test/src/main_cubecrypto.c Outdated
@dgarske dgarske changed the title CubeMX AES crypto-callback GCM test (cubeaes) CubeMX HW crypto-callback tests (cubeaes + cubecrypto) Jul 22, 2026
@dgarske
dgarske force-pushed the stm32_cubemx_aes_cb branch from 1f300ff to 50426e6 Compare July 22, 2026 17:55
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