Self-test interface for PSA crypto #7781
Labels
component-crypto
Crypto primitives and low-level interfaces
enhancement
help-wanted
This issue is not being actively worked on, but PRs welcome.
needs-design-approval
priority-low
Low priority - this may not receive review soon
size-m
Estimated task size: medium (~1w)
Some security certifications require the product to perform a “self-test” before doing any cryptographic operation. A self-test is a use of the specific cryptographic mechanism with a known answer test (or a consistency test for non-deterministic mechanisms).
In Mbed TLS, each low-level module has a
mbedtls_xxx_self_test
function, which applications can call. In Mbed TLS 4.0, many of these low-level modules will become private, which removes access to self-tests. Also, the driver interface currently has no self-test interface.Applications that require a self-test can mostly arrange one themselves. This requires the application to know what cryptographic mechanisms it uses, but that's a given when getting a certification. So having self-tests built into the library is convenient but not strictly necessary.
There is however a gap which applications cannot fill: mechanisms that the PSA crypto implementation uses internally. In particular, there is no way for application code to perform a self-test on the PRNG used to power the random generator. So this, at least, needs to be a feature of the library.
The Mbed TLS development team is not currently planning to work on this feature. If you need it, please contact us, ideally with a plan to contribute the feature.
The text was updated successfully, but these errors were encountered: