summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_prime.h
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2007-09-18 20:55:10 +0000
committerAndy Polyakov <appro@openssl.org>2007-09-18 20:55:10 +0000
commitab011d51be7c468899b486c235fc6db17d51a959 (patch)
tree71524c662c88ac46d6a465dadd9bb1d0575002e7 /crypto/bn/bn_prime.h
parent898d9b1a87aa65cab480253bcf73b56436e54501 (diff)
Minimize stack utilization in probable_prime [from HEAD].
Diffstat (limited to 'crypto/bn/bn_prime.h')
-rw-r--r--crypto/bn/bn_prime.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bn/bn_prime.h b/crypto/bn/bn_prime.h
index b7cf9a9bfe..51d2194feb 100644
--- a/crypto/bn/bn_prime.h
+++ b/crypto/bn/bn_prime.h
@@ -58,10 +58,12 @@
#ifndef EIGHT_BIT
#define NUMPRIMES 2048
+typedef unsigned short prime_t;
#else
#define NUMPRIMES 54
+typedef unsigned char prime_t;
#endif
-static const unsigned int primes[NUMPRIMES]=
+static const prime_t primes[NUMPRIMES]=
{
2, 3, 5, 7, 11, 13, 17, 19,
23, 29, 31, 37, 41, 43, 47, 53,