mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
CTR_DRBG: explicitly set entropy_nonce_len=0 when desired
No behavior change. Prepare for a future version that will set the entropy nonce length to a nonzero value by default.
This commit is contained in:
@ -732,6 +732,7 @@ int mbedtls_ctr_drbg_self_test( int verbose )
|
||||
|
||||
test_offset = 0;
|
||||
mbedtls_ctr_drbg_set_entropy_len( &ctx, 32 );
|
||||
mbedtls_ctr_drbg_set_nonce_len( &ctx, 0 );
|
||||
CHK( mbedtls_ctr_drbg_seed( &ctx,
|
||||
ctr_drbg_self_test_entropy,
|
||||
(void *) entropy_source_pr,
|
||||
@ -756,6 +757,7 @@ int mbedtls_ctr_drbg_self_test( int verbose )
|
||||
|
||||
test_offset = 0;
|
||||
mbedtls_ctr_drbg_set_entropy_len( &ctx, 32 );
|
||||
mbedtls_ctr_drbg_set_nonce_len( &ctx, 0 );
|
||||
CHK( mbedtls_ctr_drbg_seed( &ctx,
|
||||
ctr_drbg_self_test_entropy,
|
||||
(void *) entropy_source_nopr,
|
||||
|
Reference in New Issue
Block a user