mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 18:05:37 +01:00
b98e326455
According to SP800-90A, the DRBG seeding process should use a nonce of length `security_strength / 2` bits as part of the DRBG seed. It further notes that this nonce may be drawn from the same source of entropy that is used for the first `security_strength` bits of the DRBG seed. The present HMAC DRBG implementation does that, requesting `security_strength * 3 / 2` bits of entropy from the configured entropy source in total to form the initial part of the DRBG seed. However, some entropy sources may have thresholds in terms of how much entropy they can provide in a single call to their entropy gathering function which may be exceeded by the present HMAC DRBG implementation even if the threshold is not smaller than `security_strength` bits. Specifically, this is the case for our own entropy module implementation which only allows requesting at most 32 Bytes of entropy at a time in configurations disabling SHA-512, and this leads to runtime failure of HMAC DRBG when used with Mbed Crypto' own entropy callbacks in such configurations. This commit fixes this by splitting the seed entropy acquisition into two calls, one requesting `security_strength` bits first, and another one requesting `security_strength / 2` bits for the nonce. Fixes #237. |
||
---|---|---|
.. | ||
.gitignore | ||
aes.c | ||
aesni.c | ||
arc4.c | ||
asn1parse.c | ||
asn1write.c | ||
base64.c | ||
bignum.c | ||
blowfish.c | ||
camellia.c | ||
ccm.c | ||
certs.c | ||
cipher_wrap.c | ||
cipher.c | ||
cmac.c | ||
CMakeLists.txt | ||
ctr_drbg.c | ||
debug.c | ||
des.c | ||
dhm.c | ||
ecdh.c | ||
ecdsa.c | ||
ecjpake.c | ||
ecp_curves.c | ||
ecp.c | ||
entropy_poll.c | ||
entropy.c | ||
error.c | ||
gcm.c | ||
havege.c | ||
hmac_drbg.c | ||
Makefile | ||
md2.c | ||
md4.c | ||
md5.c | ||
md_wrap.c | ||
md.c | ||
memory_buffer_alloc.c | ||
net_sockets.c | ||
oid.c | ||
padlock.c | ||
pem.c | ||
pk_wrap.c | ||
pk.c | ||
pkcs5.c | ||
pkcs11.c | ||
pkcs12.c | ||
pkparse.c | ||
pkwrite.c | ||
platform.c | ||
ripemd160.c | ||
rsa_internal.c | ||
rsa.c | ||
sha1.c | ||
sha256.c | ||
sha512.c | ||
ssl_cache.c | ||
ssl_ciphersuites.c | ||
ssl_cli.c | ||
ssl_cookie.c | ||
ssl_srv.c | ||
ssl_ticket.c | ||
ssl_tls.c | ||
threading.c | ||
timing.c | ||
version_features.c | ||
version.c | ||
x509_create.c | ||
x509_crl.c | ||
x509_crt.c | ||
x509_csr.c | ||
x509.c | ||
x509write_crt.c | ||
x509write_csr.c | ||
xtea.c |