Add Altera Agilex 5 SDM crypto offload port - #11042
Conversation
|
retest this please |
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.
|
fb05062 to
cb2d0e5
Compare
|
Jenkins retest this please |
cb2d0e5 to
7fd8b49
Compare
7fd8b49 to
0ffd850
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11042
Scan targets checked: wolfcrypt-bugs, wolfcrypt-port-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src
Findings: 19
19 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
Description
partner pr here: wolfSSL/meta-wolfssl#176