diff options
author | Andy Polyakov <appro@openssl.org> | 2007-09-18 20:52:05 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2007-09-18 20:52:05 +0000 |
commit | 75a8e30f4fdb9724661875ded75689fad3bcbb39 (patch) | |
tree | e5a0fe48a8b4ad5fc599d17120a6be1a2b543828 /crypto/bn/bn_prime.c | |
parent | 716b87a026c124dfb6738d8b64946371005a4533 (diff) |
Minimize stack utilization in probable_prime.
Diffstat (limited to 'crypto/bn/bn_prime.c')
-rw-r--r-- | crypto/bn/bn_prime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bn/bn_prime.c b/crypto/bn/bn_prime.c index 5bab019553..7b25979dd1 100644 --- a/crypto/bn/bn_prime.c +++ b/crypto/bn/bn_prime.c @@ -377,14 +377,14 @@ static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1, static int probable_prime(BIGNUM *rnd, int bits) { int i; - BN_ULONG mods[NUMPRIMES]; + prime_t mods[NUMPRIMES]; BN_ULONG delta,maxdelta; again: if (!BN_rand(rnd,bits,1,1)) return(0); /* we now have a random number 'rand' to test. */ for (i=1; i<NUMPRIMES; i++) - mods[i]=BN_mod_word(rnd,(BN_ULONG)primes[i]); + mods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]); maxdelta=BN_MASK2 - primes[NUMPRIMES-1]; delta=0; loop: for (i=1; i<NUMPRIMES; i++) |