Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self-test interface for PSA crypto #7781

Open
gilles-peskine-arm opened this issue Jun 15, 2023 · 0 comments
Open

Self-test interface for PSA crypto #7781

gilles-peskine-arm opened this issue Jun 15, 2023 · 0 comments
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)

Comments

@gilles-peskine-arm
Copy link
Contributor

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.

@gilles-peskine-arm gilles-peskine-arm added enhancement help-wanted This issue is not being actively worked on, but PRs welcome. needs-design-approval component-crypto Crypto primitives and low-level interfaces size-m Estimated task size: medium (~1w) priority-low Low priority - this may not receive review soon labels Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
Status: No status
Development

No branches or pull requests

1 participant