Skip to content

Support for STM32 HMAC hardware#9745

Open
dgarske wants to merge 5 commits intowolfSSL:masterfrom
dgarske:stm32_hmac
Open

Support for STM32 HMAC hardware#9745
dgarske wants to merge 5 commits intowolfSSL:masterfrom
dgarske:stm32_hmac

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Feb 5, 2026

Description

Support for STM32 HMAC hardware

Testing

Not tested on hardware yet. Plan to test on STM32H753 then STM32H563.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@dgarske dgarske self-assigned this Feb 5, 2026
@dgarske
Copy link
Contributor Author

dgarske commented Feb 5, 2026

Jenkins retest this please: "RequestAbortedException"

@dgarske dgarske force-pushed the stm32_hmac branch 2 times, most recently from fd112e1 to 0919f82 Compare February 6, 2026 06:10
@dgarske
Copy link
Contributor Author

dgarske commented Feb 6, 2026

Jenkins retest this please: "PRB-linuxkm.txt_0" -> "FAIL scripts/unit.test"

@dgarske dgarske marked this pull request as ready for review February 10, 2026 00:52
@dgarske
Copy link
Contributor Author

dgarske commented Feb 10, 2026

Jenkins retest this please "Generic Config" "AgentOfflineException"

@dgarske
Copy link
Contributor Author

dgarske commented Feb 11, 2026

Jenkins retest this please: PRG-long-runtime_0 "FAIL scripts/unit.test" "wolfSSL error: tcp connect failed: Connection refused"

Copy link
Contributor

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

This pull request adds support for STM32 HMAC hardware acceleration, complementing the existing STM32 HASH hardware support. The implementation allows wolfSSL to leverage the STM32 HASH peripheral's HMAC mode for accelerated HMAC operations on supported STM32 microcontrollers (such as STM32H753 and STM32H563 mentioned in the PR description).

Changes:

  • Adds conditional compilation support for STM32 HMAC via STM32_HMAC macro with disable option NO_STM32_HMAC
  • Implements hardware-accelerated HMAC functions that interface with STM32 HASH peripheral in HMAC mode
  • Integrates STM32 HMAC acceleration into wolfSSL's HMAC API with transparent fallback to software implementation

Reviewed changes

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

Show a summary per file
File Description
wolfssl/wolfcrypt/settings.h Adds conditional definition of STM32_HMAC macro when NO_STM32_HMAC is not defined
wolfssl/wolfcrypt/port/st/stm32.h Declares HMAC hardware API functions and adds HASH_ALGOMODE_HMAC macro compatibility
wolfssl/wolfcrypt/hmac.h Extends Hmac structure with STM32-specific context and cached algorithm parameters
wolfcrypt/src/port/st/stm32.c Implements STM32 HMAC hardware functions including SetKey, Update (macro), and Final operations
wolfcrypt/src/hmac.c Integrates STM32 HMAC hardware path into wc_HmacSetKey, wc_HmacUpdate, and wc_HmacFinal
.wolfssl_known_macro_extras Adds HASH_AlgoMode_HMAC and NO_STM32_HMAC to known macro list

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

@LinuxJedi
Copy link
Member

@dgarske when it is ready, I'm happy to test on an MP1 too (which I think should support this)

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

Comments