Crypto knowledge: up to PSA Crypto 1.4, XOF test driver #265

Merged
gilles-peskine-arm merged 16 commits from crypto_knowledge-psa_spec_1.4-no_pake into main 2026-02-16 09:05:56 -06:00
gilles-peskine-arm commented 2026-01-08 11:12:02 -06:00 (Migrated from github.com)

Add support for things that will be needed for ML-DSA: key type, algorithm, and also XOF category support for SHAKE. Needed for https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/683 and https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/633.

I've also added support for other mechanisms to generate_psa_tests.py, covering most of what is in version 1.4 of the API including the PQC extension. There are two exceptions for key data: PAKE keys (too fiddly, might need extra work to cut down on the curves), and stateful hash-based signatures (no format defined for key pairs). I have some local testing that suggests that these are the only exceptions, but it's far from being in a reviewable state, and not particularly important.

Status: ready.

PR checklist

Add support for things that will be needed for [ML-DSA](https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/633): key type, algorithm, and also [XOF category support for SHAKE](https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/627). Needed for https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/683 and https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/633. I've also added support for other mechanisms to `generate_psa_tests.py`, covering most of what is in [version 1.4 of the API](https://arm-software.github.io/psa-api/crypto/1.4/) including the [PQC extension](https://arm-software.github.io/psa-api/crypto/1.4/ext-pqc/). There are two exceptions for key data: PAKE keys (too fiddly, might need extra work to cut down on the curves), and stateful hash-based signatures (no format defined for key pairs). I have some local testing that suggests that these are the only exceptions, but it's far from being in a reviewable state, and not particularly important. Status: ready. ## PR checklist - [x] **TF-PSA-Crypto PR** provided https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/683 - [x] **development PR** not required because: only crypto - [x] **3.6 PR** not required because: only support for new features
bjwtaylor (Migrated from github.com) reviewed 2026-02-12 08:36:50 -06:00
bjwtaylor (Migrated from github.com) left a comment

A few initial questions

A few initial questions
bjwtaylor (Migrated from github.com) commented 2026-02-12 08:36:37 -06:00

Will this work with all versions of mbedtls ie. if there is no PAKE in the version will this error?

Will this work with all versions of mbedtls ie. if there is no PAKE in the version will this error?
@ -455,16 +489,20 @@ class Algorithm:
"""
return short_expression(self.expression, level=level)
bjwtaylor (Migrated from github.com) commented 2026-02-12 08:33:21 -06:00

Is there a bit/byte mismatch here. All the other entries appear to be bytes and PSA_ALG_SM3 looks like it could be bits?

Is there a bit/byte mismatch here. All the other entries appear to be bytes and PSA_ALG_SM3 looks like it could be bits?
valeriosetti (Migrated from github.com) reviewed 2026-02-16 02:58:55 -06:00
gilles-peskine-arm (Migrated from github.com) reviewed 2026-02-16 04:11:21 -06:00
gilles-peskine-arm (Migrated from github.com) commented 2026-02-16 04:11:20 -06:00

No, it wouldn't. That's preexisting, out of scope, and not important since we aren't planning to remove PAKE. What's more problematic, but also preexisting and out of scope, is that this excludes PAKE from systematic testing of operation failure, even if we add support for it in a branch. But I really don't want to get into the complexity of PAKE on the way to implement something completely different.

No, it wouldn't. That's preexisting, out of scope, and not important since we aren't planning to remove PAKE. What's more problematic, but also preexisting and out of scope, is that this excludes PAKE from systematic testing of operation failure, even if we add support for it in a branch. But I really don't want to get into the complexity of PAKE on the way to implement something completely different.
valeriosetti (Migrated from github.com) approved these changes 2026-02-16 04:14:08 -06:00
bjwtaylor (Migrated from github.com) approved these changes 2026-02-16 09:04:34 -06:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/mbedtls-framework!265
No description provided.