diff options
author | Rich Salz <rsalz@openssl.org> | 2017-08-03 09:23:28 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-08-03 09:23:28 -0400 |
commit | 75e2c877650444fb829547bdb58d46eb1297bc1a (patch) | |
tree | 67ad6280bccdca4ae95cc269b1994ea4c1557aa7 /crypto/rsa | |
parent | 67dc995eaf538ea309c6292a1a5073465201f55b (diff) | |
download | openssl-75e2c877650444fb829547bdb58d46eb1297bc1a.zip openssl-75e2c877650444fb829547bdb58d46eb1297bc1a.tar.gz openssl-75e2c877650444fb829547bdb58d46eb1297bc1a.tar.bz2 |
Switch from ossl_rand to DRBG rand
If RAND_add wraps around, XOR with existing. Add test to drbgtest that
does the wrap-around.
Re-order seeding and stop after first success.
Add RAND_poll_ex()
Use the DF and therefore lower RANDOMNESS_NEEDED. Also, for child DRBG's,
mix in the address as the personalization bits.
Centralize the entropy callbacks, from drbg_lib to rand_lib.
(Conceptually, entropy is part of the enclosing application.)
Thanks to Dr. Matthias St Pierre for the suggestion.
Various code cleanups:
-Make state an enum; inline RANDerr calls.
-Add RAND_POLL_RETRIES (thanks Pauli for the idea)
-Remove most RAND_seed calls from rest of library
-Rename DRBG_CTX to RAND_DRBG, etc.
-Move some code from drbg_lib to drbg_rand; drbg_lib is now only the
implementation of NIST DRBG.
-Remove blocklength
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/4019)
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_crpt.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/crypto/rsa/rsa_crpt.c b/crypto/rsa/rsa_crpt.c index 9cd733b..2b676fd 100644 --- a/crypto/rsa/rsa_crpt.c +++ b/crypto/rsa/rsa_crpt.c @@ -136,16 +136,6 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx) } else e = rsa->e; - if ((RAND_status() == 0) && rsa->d != NULL - && bn_get_words(rsa->d) != NULL) { - /* - * if PRNG is not properly seeded, resort to secret exponent as - * unpredictable seed - */ - RAND_add(bn_get_words(rsa->d), bn_get_dmax(rsa->d) * sizeof(BN_ULONG), - 0.0); - } - { BIGNUM *n = BN_new(); |