MLDSA doesn't detect SHAKE failures #744

Open
opened 2026-04-08 14:54:51 -05:00 by gilles-peskine-arm · 0 comments
gilles-peskine-arm commented 2026-04-08 14:54:51 -05:00 (Migrated from github.com)

MLDSA, implemented through mldsa-native, doesn't detect failures of a SHAKE operation.

The SHAKE implementation in mldsa-native (used when TF_PSA_CRYPTO_PQCP_OWN_SHAKE is enabled) cannot fail. Our built-in SHAKE implementation (used otherwise, unless a PSA accelerator driver is enabled) cannot fail, except if the desired SHAKE variant is enabled, but we check for that at compile time. So the only configuration where a runtime failure is possible is when using a third-party SHAKE driver. (For testing, we can force a failure in our test driver.)

Since mldsa-native's SHAKE callbacks return void, there's no natural way to convey a failure.

MLDSA, implemented through mldsa-native, doesn't detect failures of a SHAKE operation. The SHAKE implementation in mldsa-native (used when `TF_PSA_CRYPTO_PQCP_OWN_SHAKE` is enabled) cannot fail. Our built-in SHAKE implementation (used otherwise, unless a PSA accelerator driver is enabled) cannot fail, except if the desired SHAKE variant is enabled, but we check for that at compile time. So the only configuration where a runtime failure is possible is when using a third-party SHAKE driver. (For testing, we can force a failure in our test driver.) Since mldsa-native's SHAKE callbacks return `void`, there's no natural way to convey a failure.
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/TF-PSA-Crypto#744
No description provided.