-
Notifications
You must be signed in to change notification settings - Fork 22
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
Remove RNG parameters from LMS #168
Comments
Task on hold during rethink A possible wrinkle: in the long term, we'd like to support explicit PSA contexts in non-PSA APIs, as requested in ARM-software/psa-api#77. Under that design, functions that take an RNG argument and no key argument should take a PSA context argument, and should make RNG calls through that context. Functions that have a key argument would use that key to determine the PSA context. In many places, we already track a “context” in the form of RNG arguments that are passed down from API functions to legacy crypto calls. Rather than completely remove those RNG arguments, it could make sense to rewrite By the time of the 1.0 release, it's unlikely that the PSA crypto context API extension will be finalized, and in any case we do not intend to implement that context API until well after 1.0. So in 1.0, we would have a context parameter where the only supported value is NULL, and other values would be silently ignored. That doesn't seem very nice. But on the other hand, if we don't do it, then later we'll have to reintroduce a context parameter that's passed down, and more annoyingly, we'd have to add a |
We do not currently consider multiple crypto contexts to be high priority in TF-PSA-Crypto and Mbed TLS, and it will likely have consequences on the API that go beyond the functions that take an RNG argument. Therefore it's unlikely that whatever we can do before 1.0 would be sufficient to finish the for multiple crypto contexts in 4.x. Hence, let's not bother with them at all, and go ahead and remove the RNG parameters. |
In TF-PSA-Crypto 1.0, all RNG calls will go to the PSA RNG. So public functions must no longer take an RNG callback (it would not be honored).
Legacy RNG callbacks have the following form:
The goal of this task is to update the functions in
include/mbedtls/lms.h
andsrc/{lms,lmots}.*
that take an RNG argument:f_rng
andp_rng
arguments from the function prototypes.f_rng
to instead callpsa_generate_random
.The text was updated successfully, but these errors were encountered: