version 1.10, 2005/01/17 03:25:46 |
version 1.11, 2005/05/23 22:44:01 |
|
|
static u_int32_t largebits, largememory; /* megabytes */ |
static u_int32_t largebits, largememory; /* megabytes */ |
static BIGNUM *largebase; |
static BIGNUM *largebase; |
|
|
int gen_candidates(FILE *, int, int, BIGNUM *); |
int gen_candidates(FILE *, u_int32_t, u_int32_t, BIGNUM *); |
int prime_test(FILE *, FILE *, u_int32_t, u_int32_t); |
int prime_test(FILE *, FILE *, u_int32_t, u_int32_t); |
|
|
/* |
/* |
|
|
* The list is checked against small known primes (less than 2**30). |
* The list is checked against small known primes (less than 2**30). |
*/ |
*/ |
int |
int |
gen_candidates(FILE *out, int memory, int power, BIGNUM *start) |
gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start) |
{ |
{ |
BIGNUM *q; |
BIGNUM *q; |
u_int32_t j, r, s, t; |
u_int32_t j, r, s, t; |
u_int32_t smallwords = TINY_NUMBER >> 6; |
u_int32_t smallwords = TINY_NUMBER >> 6; |
u_int32_t tinywords = TINY_NUMBER >> 6; |
u_int32_t tinywords = TINY_NUMBER >> 6; |
time_t time_start, time_stop; |
time_t time_start, time_stop; |
int i, ret = 0; |
u_int32_t i; |
|
int ret = 0; |
|
|
largememory = memory; |
largememory = memory; |
|
|
|
|
* due to earlier inconsistencies in interpretation, check |
* due to earlier inconsistencies in interpretation, check |
* the proposed bit size. |
* the proposed bit size. |
*/ |
*/ |
if (BN_num_bits(p) != (in_size + 1)) { |
if ((u_int32_t)BN_num_bits(p) != (in_size + 1)) { |
debug2("%10u: bit size %u mismatch", count_in, in_size); |
debug2("%10u: bit size %u mismatch", count_in, in_size); |
continue; |
continue; |
} |
} |