Add Altera Agilex 5 SDM crypto offload port - #11042
Open
aidangarske wants to merge 1 commit into
Open
Conversation
|
retest this please |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new wolfCrypt hardware-acceleration port for the Altera Agilex 5 Secure Device Manager (SDM) via libfcs, wiring it into wolfCrypt’s crypto callback framework with software fallback behavior and CI stubs.
Changes:
- Introduces the Altera FCS port (session glue + crypto callback dispatcher + RNG/SHA-256/AES/ECC/HMAC verify integration) and associated public header/docs.
- Integrates the port into Autotools and CMake builds (options, defines, sources, link requirements) and adds a CI workflow using stubbed libfcs/libfdt.
- Updates crypto callback lifecycle handling (cleanup returns status; cleanup can defer/unwind when callbacks report BUSY_E) and adds regression coverage in wolfcrypt tests.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| wolfssl/wolfcrypt/settings.h | Auto-enables crypto-callback capabilities needed by the FCS port (CMD/SETKEY). |
| wolfssl/wolfcrypt/port/altera/altera_fcs.h | Adds the public Altera FCS port header/API surface and compile-time guards. |
| wolfssl/wolfcrypt/include.am | Installs the new Altera FCS port header. |
| wolfssl/wolfcrypt/cryptocb.h | Updates crypto callback cleanup API to return status. |
| wolfcrypt/test/test.c | Adds ALTERA-FCS hardware/no-hardware tests and a BUSY_E unregister regression test. |
| wolfcrypt/src/wc_port.c | Auto-registers/unregisters the FCS callback in wolfCrypt_Init/Cleanup with BUSY handling. |
| wolfcrypt/src/port/altera/README.md | Documents build, behavior, limitations, and validation for the Altera FCS port. |
| wolfcrypt/src/port/altera/altera_fcs_rng.c | Implements SDM TRNG seeding path for wolfCrypt RNG via libfcs. |
| wolfcrypt/src/port/altera/altera_fcs_hmac.c | Adds explicit API for SDM “vault-key” HMAC verification. |
| wolfcrypt/src/port/altera/altera_fcs_hash.c | Implements buffered SHA offload with mandatory copy/free callbacks and software fallback. |
| wolfcrypt/src/port/altera/altera_fcs_glue.c | Implements process-wide session management, locking, key-id allocation, and atfork behavior. |
| wolfcrypt/src/port/altera/altera_fcs_ecc.c | Implements device-resident ECC key creation and ECDSA/ECDH operations with no silent fallback. |
| wolfcrypt/src/port/altera/altera_fcs_cryptocb.c | Implements the crypto-callback dispatcher, registration mask, and deferred unregister logic. |
| wolfcrypt/src/port/altera/altera_fcs_aes.c | Implements AES-CBC/AES-CTR offload with key import/retirement and strict eligibility rules. |
| wolfcrypt/src/include.am | Adds Altera FCS sources to distribution and conditional build sources. |
| wolfcrypt/src/cryptocb.c | Makes crypto callback cleanup return status and honors BUSY_E on unregister command. |
| tests/include.am | Adds stubbed libfcs/libfdt files to the distribution list. |
| tests/altera-fcs-stub/libfcs.h | Provides minimal libfcs API header for host CI builds. |
| tests/altera-fcs-stub/libfcs_stub.c | Stub implementation that reports unavailable hardware (CI fallback validation). |
| tests/altera-fcs-stub/libfcs_osal_types.h | Stub OSAL type definitions needed by the libfcs header. |
| tests/altera-fcs-stub/fdt_stub.c | Link-only stub for libfdt dependency in CI. |
| configure.ac | Adds --enable-alterafcs option and wires feature selection/defines/libs into Autotools. |
| CMakeLists.txt | Adds WOLFSSL_ALTERA_FCS option and finds/lib-links libfcs + libfdt for CMake builds. |
| cmake/options.h.in | Adds CMake-generated preprocessor defines for Altera FCS-related options. |
| cmake/functions.cmake | Adds BUILD_ALTERA_FCS* feature derivation and source-list wiring for CMake builds. |
| .github/workflows/altera-fcs.yml | Adds CI workflow building/testing the port against the stubbed dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
aidangarske
force-pushed
the
agilex5-fcs-port
branch
from
August 4, 2026 04:04
fb05062 to
cb2d0e5
Compare
Member
Author
|
Jenkins retest this please |
aidangarske
force-pushed
the
agilex5-fcs-port
branch
from
August 4, 2026 17:09
cb2d0e5 to
7fd8b49
Compare
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.
Description
partner pr here: wolfSSL/meta-wolfssl#176