Skip to content

Conversation

@asmellby
Copy link
Contributor

@asmellby asmellby commented Nov 18, 2025

Refactor test cases to enable transparent and opaque variants in the same test binary. Test both generated and imported key material.

Enable a limited set of opaque tests on SiWx91x. SiWx91x only supports AEAD and ECC with opaque keys. Security configuration must be provisioned to the device to be able to execute the opaque tests.


Note

Refactors PSA Crypto tests to run transparent and opaque (generated/imported) variants with driver-gated coverage, adds SiWx91x provisioning guidance, and updates build/test config.

  • Tests (psa_crypto):
    • Refactor test logic into helpers with generate_key and location params; add ZTEST variants for transparent and opaque across:
      • AEAD: AES-CCM, AES-GCM, CHACHA20_POLY1305
      • Ciphers: AES-CBC (multipart/single), AES-ECB, CHACHA20
      • Signing: ECDSA secp256r1 (optional verify for opaque)
      • Key agreement: ECDH X25519
    • Conditional execution via TEST_OPAQUE_* and skips (e.g., no import, no multipart, no verify where limited).
    • Remove wrapped_keys test variant.
  • Build/Config:
    • CMakeLists.txt: add driver-specific TEST_OPAQUE_* defines (full for HSE; limited for SiWx91x: NO_IMPORT_KEY, NO_MULTIPART, NO_VERIFY).
    • testcase.yaml: set CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS=n and adjust SW-only config; keep platform allow lists.
  • Docs:
    • Add README.md detailing SiWx91x provisioning and MIC configuration steps.
  • Licensing:
    • Add REUSE.toml with default SPDX annotations.

Written by Cursor Bugbot for commit b5b384b. This will update automatically on new commits. Configure here.

@asmellby asmellby requested a review from a team as a code owner November 18, 2025 11:34
Refactor test cases to enable transparent and opaque variants
in the same test binary. Test both generated and imported key
material.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Enable a limited set of opaque tests on SiWx91x. SiWx91x only
supports AEAD and ECC with opaque keys. Security configuration
must be provisioned to the device to be able to execute the
opaque tests.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
@asmellby asmellby force-pushed the feature/crypto-test-refactor branch from 9dd7c88 to e2d8f74 Compare November 18, 2025 11:45
Add REUSE.toml to add default license to config files that typically
don't include license and copyright text.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
@asmellby asmellby force-pushed the feature/crypto-test-refactor branch from e2d8f74 to b5b384b Compare November 18, 2025 11:53
@asmellby asmellby merged commit d1661e8 into SiliconLabsSoftware:main Nov 21, 2025
6 checks passed
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