diff options
author | Ulf Möller <ulf@openssl.org> | 2000-01-22 20:05:23 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-01-22 20:05:23 +0000 |
commit | 4486d0cd7a715aed7ca3728aa24413d91666bb68 (patch) | |
tree | 36342c32d8bd73c31ea5e3d33e9ee7796bab873c /crypto/bn/bn.h | |
parent | 09483c58e3b21841d2761ce90b1f12b24f814881 (diff) | |
download | openssl-4486d0cd7a715aed7ca3728aa24413d91666bb68.tar.gz |
Document the DH library, and make some minor changes along the way.
Diffstat (limited to 'crypto/bn/bn.h')
-rw-r--r-- | crypto/bn/bn.h | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index dd1d263098..f803f0fea1 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -283,23 +283,8 @@ typedef struct bn_recp_ctx_st #define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ r,a,&((mont)->RR),(mont),ctx) -/* number of Miller-Rabin iterations for an error rate of less than 2^-80 - * for random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook - * of Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996]; - * original paper: Damgaard, Landrock, Pomerance: Average case error estimates - * for the strong probable prime test. -- Math. Comp. 61 (1993) 177-194) */ -#define BN_prime_checks(b) ((b) >= 1300 ? 2 : \ - (b) >= 850 ? 3 : \ - (b) >= 650 ? 4 : \ - (b) >= 550 ? 5 : \ - (b) >= 450 ? 6 : \ - (b) >= 400 ? 7 : \ - (b) >= 350 ? 8 : \ - (b) >= 300 ? 9 : \ - (b) >= 250 ? 12 : \ - (b) >= 200 ? 15 : \ - (b) >= 150 ? 18 : \ - /* b >= 100 */ 27) +#define BN_prime_checks 0 /* default: select number of iterations + based on the size of the number */ #define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) #define BN_is_word(a,w) (((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) |