Skip to content

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Sep 22, 2025

test_suite_block_cipher was mostly testing the (rare in practice) PSA-not-initialized case. Also test the PSA-initialized case.

Probably not a significant test gap since block_cipher is an internal module, and higher-level tests should ensure that everything is fine with API functions.

I noticed while working on Mbed-TLS/TF-PSA-Crypto#466 (review).

PR checklist

  • changelog not required because: test only
  • development PR not required because: crypto only
  • TF-PSA-Crypto PR not required because: no more legacy dispatch in TF-PSA-Crypto
  • framework PR not required
  • 3.6 PR here
  • tests provided | not required because:

Signed-off-by: Gilles Peskine <[email protected]>
* Rename the suite containing dynamic dispatch tests.
* Duplicate the suite containing test vectors and invalid scenarios:
  there will be one suite with PSA not initialized (as is the case today),
  and one new suite suite with PSA initialized. The distinction will be made
  in a subsequent commit.

Signed-off-by: Gilles Peskine <[email protected]>
The job of the block_cipher module is to dispatch to either legacy code or
PSA, depending on whether PSA is initialized. We were only testing the
PSA-not-initialized legacy dispatch, except in the few dynamic dispatch test
cases. Run the invalid-input and test vectors with PSA initialized as well.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added component-crypto Crypto primitives and low-level interfaces needs-ci Needs to pass CI tests priority-medium Medium priority - this can be reviewed as time permits size-xs Estimated task size: extra small (a few hours at most) labels Sep 22, 2025
@gilles-peskine-arm gilles-peskine-arm changed the base branch from development to mbedtls-3.6 September 22, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug component-crypto Crypto primitives and low-level interfaces needs-ci Needs to pass CI tests priority-medium Medium priority - this can be reviewed as time permits size-xs Estimated task size: extra small (a few hours at most)

Projects

Status: In Development
Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant