From cda5fe552218a38846630e290630aa98b5cefa57 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 11 Feb 2006 15:34:37 +0000 Subject: [PATCH] bbs-gen: Don't use the safe stepper. This didn't use the safe-tester anyway. I no longer understand why this code was ever written this way, and since I want to eradicate the safe stepper, this seems a good change now. --- bbs-gen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bbs-gen.c b/bbs-gen.c index 9afa245..3b419af 100644 --- a/bbs-gen.c +++ b/bbs-gen.c @@ -63,7 +63,8 @@ int bbs_gen(bbs_priv *bp, unsigned nbits, grand *r, unsigned n, pgen_proc *event, void *ectx) { rabin rb; - pgen_safejumpctx j; + pfilt jp; + pgen_jumpctx j; pgen_gcdstepctx g; unsigned nb = nbits/2; mp *x = MP_NEW; @@ -71,11 +72,12 @@ int bbs_gen(bbs_priv *bp, unsigned nbits, grand *r, unsigned n, /* --- Generate @p@ --- */ again: - if ((x = strongprime_setup("p", x, &j.jq, nb, r, n, event, ectx)) == 0) + if ((x = strongprime_setup("p", x, &jp, nb, r, n, event, ectx)) == 0) goto fail_x; - bp->p = pgen("p", MP_NEW, x, event, ectx, n, pgen_safejump, &j, + j.j = &jp; + bp->p = pgen("p", MP_NEW, x, event, ectx, n, pgen_jump, &j, rabin_iters(nb), pgen_test, &rb); - pfilt_destroy(&j.jq); + pfilt_destroy(&jp); if (!bp->p) { if (n) goto fail_p; -- 2.11.0