generate_psa_tests: skip ML-DSA key types #324
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 216 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.322
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #324"
general
weight: 0.35
gilles-peskine-arm
This is my first contribution here, so please bear with me if I've missed any conventions — happy to adjust.
The PSA test-data generators iterate over every PSA_KEY_TYPE_* define found in the public headers, and as far as I can tell they assume that a key type's "bits" attribute is a bit size. ML-DSA doesn't fit that model: its bits attribute is a parameter set (44/65/87), so both sizes_to_test() and key_material() choke on it. With PSA_KEY_TYPE_ML_DSA_PUBLIC_KEY becoming public in Mbed-TLS/TF-PSA-Crypto#899, generate_psa_tests.py now
fails with a KeyError.
This PR skips ML-DSA key types in the affected generators (KeyTypeNotSupported, KeyGenerate, OpFail, StorageFormat) as a minimal stopgap. I suspect the nicer long-term fix is to teach crypto_knowledge.py proper ML-DSA support — presumably that lands with TF-PSA-Crypto #900/#901 when key pairs and signatures arrive — so I'm very open to this being replaced or reworked once that happens, or sooner if you'd rather do it properly right away.