Repository navigation
testing/crypto: add the psa-arch-tests PAL layer - #4180
Open
ThePassionate wants to merge 1 commit into
Open
ThePassionate wants to merge 1 commit into
ThePassionate wants to merge 1 commit into
Conversation
Add the platform abstraction layer for the ARM PSA arch-tests, ported from Vela. The suite itself is fetched from https://github.com/ARM-software/psa-arch-tests (13 MB, 529 test sources for the crypto and storage API compliance suites), so only the NuttX-side glue is in tree: - Kconfig: PSA_ARCH_TESTS with the crypto and its sub-suites, program name, priority and stack size - Makefile / CMakeLists.txt: fetch, unpack and build the suite; the two builds rename iv and plaintext to psa_iv and psa_plaintext because those identifiers clash with NuttX test globals when the suite links in FLAT mode - include/: PAL headers - pal_crypto_config.h configures the crypto tests against mbedtls, target_database.h and the two .inc files carry the suite's test entry tables, pal_storage_config.h and pal_config.h configure the storage tests and the platform includes - src/pal_crypto.c: the PAL shim for PSA functions the suite calls that mbedtls does not implement (key agreement, PAKE, all return PSA_ERROR_NOT_SUPPORTED) Not enabled in any defconfig. The suite currently builds against the mbedtls fetched tree with the PSA Crypto API; the SE driver route (PSA_KEY_LOCATION_LOCAL_CRYPTODEV) is available to route key storage through the NuttX cryptodev. Signed-off-by: makejian <makejian@xiaomi.com>
xiaoxiang781216
approved these changes
Nov 27, 2026
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.
Summary
Add the platform abstraction layer for the ARM PSA arch-tests (https://github.com/ARM-software/psa-arch-tests), ported from Vela. The suite itself is fetched at build time (13 MB, 529 test sources for the crypto and storage API compliance suites), so only the NuttX-side glue is in tree:
PSA_ARCH_TESTSwith the crypto and its sub-suites, program name, priority and stack sizeivandplaintexttopsa_ivandpsa_plaintextbecause those identifiers clash with NuttX test globals when the suite links in FLAT modepal_crypto_config.hconfigures the crypto tests against the fetched mbedtls tree,target_database.hand the two.incfiles carry the suite test entry tables,pal_storage_config.handpal_config.hconfigure the storage testsPSA_ERROR_NOT_SUPPORTED)The PSA key management route through the NuttX cryptodev (
PSA_KEY_LOCATION_LOCAL_CRYPTODEV, from #4133) is available to back the key storage the suite exercises.Impact
No defconfig enables the suite. New
CONFIG_PSA_ARCH_TESTSoption (default n).Testing
Build-tested on sim:nsh with
CONFIG_CRYPTO_MBEDTLS+CONFIG_MBEDTLS_PSA_CRYPTO+PSA_ARCH_TESTSoptions; the suite fetches and compiles (the crypto compliance suite runs on hardware with a PSA implementation, which sim does not provide).