openssl/providers/implementations
Dimitri John Ledkov 3b7bd871c1 drbg: provide requested amount of entropy, rather than self-strength
Parent DRBG can be seed source (os or jitter) and thus able to provide
unlimited entropy.

get_entropy is documented to provide at least the request amount of
entropy. If requested amount of entropy is same as, or less than
drbg->strength, everything is compliant. However, if requested entropy
is more than drbg->strength (unlikely, but possible), the returned
amount of entropy will be insufficient and additional repeated calls
to get_entropy will be required.

Reading history of refactors, it seems to me that this function call
previouslly had assumptions and usecases that couldn't ever request or
require more than strength amount of entropy.

If entropy is set, request that amount, otherwise request
drbg->strength amount.

Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25850)
2025-01-14 12:12:02 +01:00
..
asymciphers Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
ciphers Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
digests Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex. 2024-11-20 14:12:53 +01:00
encode_decode Pre-ML-KEM/DSA decoder/encoder refactor 2025-01-10 22:23:58 +11:00
exchange Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
include/prov Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex. 2024-11-20 14:12:53 +01:00
kdfs Code & comments changes to make them in consistent 2024-12-06 15:27:51 +01:00
kem ec_kem.c: Fix ikmlen check 2024-12-30 17:13:43 +01:00
keymgmt Fix memleak in dsa_gen() 2024-11-29 19:01:01 +01:00
macs Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
rands drbg: provide requested amount of entropy, rather than self-strength 2025-01-14 12:12:02 +01:00
signature Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
storemgmt Avoid undefined behaviour with the <ctype.h> functions. 2024-10-10 20:47:48 +02:00
build.info Add KEM (Key encapsulation mechanism) support to providers 2020-09-19 18:08:46 +10:00