103 |
* be on. Again this in only really a problem on machines |
* be on. Again this in only really a problem on machines |
104 |
* using "long long's", are 32bit, and are not using my assembler code. */ |
* using "long long's", are 32bit, and are not using my assembler code. */ |
105 |
#if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux) |
#if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux) |
106 |
#define BN_DIV2W |
# ifndef BN_DIV2W |
107 |
|
# define BN_DIV2W |
108 |
|
# endif |
109 |
#endif |
#endif |
110 |
|
|
111 |
/* assuming long is 64bit - this is the DEC Alpha |
/* assuming long is 64bit - this is the DEC Alpha |
168 |
#define BN_BYTES 4 |
#define BN_BYTES 4 |
169 |
#define BN_BITS2 32 |
#define BN_BITS2 32 |
170 |
#define BN_BITS4 16 |
#define BN_BITS4 16 |
171 |
#ifdef WIN32 |
#ifdef _MSC_VER |
172 |
/* VC++ doesn't like the LL suffix */ |
/* VC++ doesn't like the LL suffix */ |
173 |
#define BN_MASK (0xffffffffffffffffL) |
#define BN_MASK (0xffffffffffffffffL) |
174 |
#else |
#else |
344 |
int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); |
int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); |
345 |
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); |
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); |
346 |
int BN_rand_range(BIGNUM *rnd, BIGNUM *range); |
int BN_rand_range(BIGNUM *rnd, BIGNUM *range); |
347 |
|
int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); |
348 |
int BN_num_bits(const BIGNUM *a); |
int BN_num_bits(const BIGNUM *a); |
349 |
int BN_num_bits_word(BN_ULONG); |
int BN_num_bits_word(BN_ULONG); |
350 |
BIGNUM *BN_new(void); |
BIGNUM *BN_new(void); |
385 |
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); |
386 |
int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, |
int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, |
387 |
BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); |
BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); |
388 |
int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, const BIGNUM *p, |
int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, |
389 |
const BIGNUM *m,BN_CTX *ctx); |
BIGNUM *m,BN_CTX *ctx); |
390 |
int BN_mask_bits(BIGNUM *a,int n); |
int BN_mask_bits(BIGNUM *a,int n); |
391 |
int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); |
int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); |
392 |
#ifndef NO_FP_API |
#ifndef NO_FP_API |
419 |
int BN_is_prime_fasttest(const BIGNUM *p,int nchecks, |
int BN_is_prime_fasttest(const BIGNUM *p,int nchecks, |
420 |
void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg, |
void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg, |
421 |
int do_trial_division); |
int do_trial_division); |
|
void ERR_load_BN_strings(void ); |
|
422 |
|
|
423 |
BN_MONT_CTX *BN_MONT_CTX_new(void ); |
BN_MONT_CTX *BN_MONT_CTX_new(void ); |
424 |
void BN_MONT_CTX_init(BN_MONT_CTX *ctx); |
void BN_MONT_CTX_init(BN_MONT_CTX *ctx); |
489 |
} |
} |
490 |
#endif |
#endif |
491 |
#endif |
#endif |
|
|
|