diff options
author | deraadt <> | 2014-04-17 12:14:26 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-17 12:14:26 +0000 |
commit | 158ff01036c37c580db90c516caa28e5f48ae7a0 (patch) | |
tree | af52f9c7f7962a9cca944bfe4ead5df91c5dfff3 /src/lib/libcrypto/rsa/rsa_crpt.c | |
parent | 0ea210fb45bd6ba485ab770e9fe1102bc9b066fe (diff) | |
download | openbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.tar.gz openbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.tar.bz2 openbsd-158ff01036c37c580db90c516caa28e5f48ae7a0.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 */ |