Commit e480a2de authored by Niels Möller's avatar Niels Möller

(_nettle_generate_pocklington_prime): New

function. Rely on mpz_probab_prime_p (for lack of a trial division
function) for trial division.
(nettle_random_prime): Rewritten. Uses the prime table for the
smallest sizes, then trial division using a new set of tables, and
then Maurer's algorithm, calling the new
_nettle_generate_pocklington_prime for the final search.

Rev: nettle/ChangeLog:1.80
Rev: nettle/bignum-random-prime.c:1.4
Rev: nettle/bignum.h:1.5
parent 38b7209f
2010-05-26 Niels Mller <nisse@lysator.liu.se>
* bignum-random-prime.c (_nettle_generate_pocklington_prime): New
function. Rely on mpz_probab_prime_p (for lack of a trial division
function) for trial division.
(nettle_random_prime): Rewritten. Uses the prime table for the
smallest sizes, then trial division using a new set of tables, and
then Maurer's algorithm, calling the new
_nettle_generate_pocklington_prime for the final search.
2010-05-25 Niels Mller <nisse@lysator.liu.se>
* testsuite/dsa-test.c (test_main): Updated for dsa testing
changes.
changes.
* testsuite/dsa-keygen-test.c (test_main): Test dsa256.
......
This diff is collapsed.
......@@ -89,6 +89,13 @@ void
nettle_random_prime(mpz_t p, unsigned bits,
void *ctx, nettle_random_func random);
void
_nettle_generate_pocklington_prime (mpz_t p, unsigned bits,
void *ctx, nettle_random_func random,
const mpz_t p0,
const mpz_t q,
const mpz_t p0q);
/* sexp parsing */
struct sexp_iterator;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment