diff options
author | deraadt <> | 2014-04-17 12:14:26 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-17 12:14:26 +0000 |
commit | 568af76a0d1a807b73087c7dcdc4cb57b4c044df (patch) | |
tree | af52f9c7f7962a9cca944bfe4ead5df91c5dfff3 /src/lib/libcrypto/rsa/rsa_crpt.c | |
parent | 90d4a4eef2b7d8b8f45fbaa5423ed8f8d574ed9b (diff) | |
download | openbsd-568af76a0d1a807b73087c7dcdc4cb57b4c044df.tar.gz openbsd-568af76a0d1a807b73087c7dcdc4cb57b4c044df.tar.bz2 openbsd-568af76a0d1a807b73087c7dcdc4cb57b4c044df.zip |
Do not feed RSA private key information to the random subsystem as
entropy. It might be fed to a pluggable random subsystem....
What were they thinking?!
ok guenther
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_crpt.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_crpt.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c index 7750366613..2e100ca457 100644 --- a/src/lib/libcrypto/rsa/rsa_crpt.c +++ b/src/lib/libcrypto/rsa/rsa_crpt.c | |||
@@ -189,14 +189,6 @@ BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx) | |||
189 | else | 189 | else |
190 | e = rsa->e; | 190 | e = rsa->e; |
191 | 191 | ||
192 | |||
193 | if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL) | ||
194 | { | ||
195 | /* if PRNG is not properly seeded, resort to secret | ||
196 | * exponent as unpredictable seed */ | ||
197 | RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0); | ||
198 | } | ||
199 | |||
200 | if (!(rsa->flags & RSA_FLAG_NO_CONSTTIME)) | 192 | if (!(rsa->flags & RSA_FLAG_NO_CONSTTIME)) |
201 | { | 193 | { |
202 | /* Set BN_FLG_CONSTTIME flag */ | 194 | /* Set BN_FLG_CONSTTIME flag */ |