summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_sqrt.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2017-11-03 20:59:16 +0100
committerKurt Roeckx <kurt@roeckx.be>2018-04-02 22:22:43 +0200
commit4cffafe96786558f66e1900ac462f9ccba921132 (patch)
treef075edeb812b1ed574e6656a7f1bd312dbe5e02e /crypto/bn/bn_sqrt.c
parent1238caa725a1dfb5f9d7ef3ba3b014d2af4cab60 (diff)
Use the private RNG for data that is not public
Reviewed-by: Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> Reviewed-by: Rich Salz <rsalz@openssl.org> Fixes: #4641 GH: #4665
Diffstat (limited to 'crypto/bn/bn_sqrt.c')
-rw-r--r--crypto/bn/bn_sqrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c
index 37cdaf87d5..be8bd1238b 100644
--- a/crypto/bn/bn_sqrt.c
+++ b/crypto/bn/bn_sqrt.c
@@ -179,7 +179,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
if (!BN_set_word(y, i))
goto end;
} else {
- if (!BN_rand(y, BN_num_bits(p), 0, 0))
+ if (!BN_priv_rand(y, BN_num_bits(p), 0, 0))
goto end;
if (BN_ucmp(y, p) >= 0) {
if (!(p->neg ? BN_add : BN_sub) (y, y, p))