mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 14:35:37 +01:00
CTR_DRBG: add the possibility of grabbing entropy for a nonce
Add a new function mbedtls_ctr_drbg_set_nonce_len() which configures the DRBG instance to call f_entropy a second time during the initial seeding to grab a nonce. The default nonce length is 0, so there is no behavior change unless the user calls the new function.
This commit is contained in:
parent
9be5098061
commit
97f59ab527
@ -357,7 +357,7 @@ void mbedtls_ctr_drbg_update( mbedtls_ctr_drbg_context *ctx,
|
|||||||
* and with output
|
* and with output
|
||||||
* ctx contains new_working_state
|
* ctx contains new_working_state
|
||||||
*/
|
*/
|
||||||
int mbedtls_ctr_drbg_reseed_internal( mbedtls_ctr_drbg_context *ctx,
|
static int mbedtls_ctr_drbg_reseed_internal( mbedtls_ctr_drbg_context *ctx,
|
||||||
const unsigned char *additional,
|
const unsigned char *additional,
|
||||||
size_t len,
|
size_t len,
|
||||||
size_t nonce_len )
|
size_t nonce_len )
|
||||||
|
Loading…
Reference in New Issue
Block a user