summaryrefslogtreecommitdiffstats
path: root/crypto/dsa/dsa_ossl.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-09-13 01:45:54 +0000
committerUlf Möller <ulf@openssl.org>2000-09-13 01:45:54 +0000
commitc11dead17c0808e1a312ca02a849ed5cdd74c535 (patch)
tree4150e025b7e77826ee229ce76891e62edaad34e4 /crypto/dsa/dsa_ossl.c
parent4041156461457749bf871e2a9f30b9fe6370c426 (diff)
Don't set the two top bits to one when generating a random number < q.:wq
Diffstat (limited to 'crypto/dsa/dsa_ossl.c')
-rw-r--r--crypto/dsa/dsa_ossl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dsa/dsa_ossl.c b/crypto/dsa/dsa_ossl.c
index b51cf6ad8d..094356518f 100644
--- a/crypto/dsa/dsa_ossl.c
+++ b/crypto/dsa/dsa_ossl.c
@@ -181,7 +181,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)
/* Get random k */
for (;;)
{
- if (!BN_rand(&k, BN_num_bits(dsa->q), 1, 0)) goto err;
+ if (!BN_rand(&k, BN_num_bits(dsa->q), 0, 0)) goto err;
if (BN_cmp(&k,dsa->q) >= 0)
BN_sub(&k,&k,dsa->q);
if (!BN_is_zero(&k)) break;