-
Notifications
You must be signed in to change notification settings - Fork 7
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
DRBG interfaces #107
Comments
How will seeding of the DRBG be achieved? How is it to be connected to a hardware TRNG providing entropy? |
The PSA DRBG will be seeded from entropy collected from entropy collection entry points provided by drivers. (Today we're using the |
Decision for 4.0: the DRBG modules are going to be private. It's likely that we'll add a PSA API for DRBG calls, but that probably won't be ready in time for 4.0, and it can be done any time in 4.x. The DRBG modules are going to undergo changes due to the entropy overhaul. |
By default, pseudorandom generator interfaces (
ctr_drbg.h
andhmac_drbg.h
) will become private in TF-PSA-Crypto 1.0 and Mbed TLS 4.0. They need to be public in Mbed TLS because the legacy crypto API requires application code to pass RNG instances around, but PSA code uses an internal RNG wherever needed. PSA does not currently have an API for pseudorandom generators. Thus, while the CTR_DRBG and HMAC_DRBG modules will continue to exist (to power the PSA RNG, and also to power deterministic ECDSA with HMAC_DRBG), there is no compelling reasons for them to be accessible from application code. Should we still have an interface for CTR_DRBG and HMAC_DRBG in TF-PSA-Crypto 1.0?Note that this solely is about application code creating DRBG instances for their own purposes. The CTR_DRBG and HMAC_DRBG will continue to exist under the hood (until the hypothetical day when we decide to use a different DRBG).
Some possibilities:
ctr_drbg.h
andhmac_drbg.h
out of the publicinclude
directory. Consequence: there is no API for CTR_DRBG and HMAC_DRBG. This is the default choice, easier for maintenance but losing functionality.psa_drbg_output_bytes()
function call a reseeding callback, or would it returnPSA_ERROR_INSUFFICIENT_ENTROPY
or a new error code?Mailing list discussion: https://lists.trustedfirmware.org/archives/list/[email protected]/thread/WM3USJYYYIWPUIVTEMIAX7YLGRLJ4TYA/
The text was updated successfully, but these errors were encountered: