Add support for wolfHAL crypto backend - #11033
Draft
AlexLanzano wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new wolfCrypt hardware-acceleration port that routes selected crypto operations through the wolfHAL driver stack via the wolfSSL crypto-callback framework, plus the autotools plumbing to build it.
Changes:
- Adds a new
wolfHALport implementation (wolfhal.c/.h) with crypto-callback dispatch for AES (ECB/CBC/GCM/CCM) and optional RNG support. - Introduces
wolfhal_settings.hand wires it intosettings.hearly to enableWOLF_CRYPTO_CBand mapWC_USE_DEVIDfor wolfHAL builds. - Extends autotools build/configure flow (
configure.ac,include.am) to enable the port via--with-wolfhal/--with-wolfhal-board, and to register the device duringwolfCrypt_Init().
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wolfssl/wolfcrypt/settings.h | Includes wolfHAL macro-only settings early during configuration. |
| wolfssl/wolfcrypt/port/wolfHAL/wolfhal.h | Public port header exposing register/unregister and optional RNG entrypoint. |
| wolfssl/wolfcrypt/port/wolfHAL/wolfhal_settings.h | Macro-only configuration enabling crypto callback + devId mapping. |
| wolfssl/wolfcrypt/include.am | Adds wolfHAL headers to autotools header lists and conditional installs. |
| wolfcrypt/src/wc_port.c | Registers the wolfHAL crypto-callback device during wolfCrypt_Init(). |
| wolfcrypt/src/port/wolfHAL/wolfhal.c | Implements crypto callback dispatch to wolfHAL AES + RNG APIs. |
| wolfcrypt/src/port/wolfHAL/README.md | Documents build flags, board.h contract, and runtime initialization order. |
| wolfcrypt/src/include.am | Adds wolfHAL source/README to autotools distribution and conditional build sources. |
| configure.ac | Adds --with-wolfhal / --with-wolfhal-board configuration and build conditionals. |
Suppressed comments (1)
configure.ac:3683
- The board include path is appended without quoting, so
--with-wolfhal-boardpaths containing spaces will be split into multiple compiler arguments and fail to findboard.h.
AM_CFLAGS="$AM_CFLAGS -I$ENABLED_WOLFHAL_BOARD"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+3642
to
+3645
| if test -e $trywolfhaldir/wolfHAL/crypto/crypto.h | ||
| then | ||
| AM_CFLAGS="$AM_CFLAGS -I$trywolfhaldir" | ||
| else |
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.