prime generation: Deploy the new Baillie--PSW testers.
[catacomb] / pub / bbs-gen.c
index 6ec65e2..3239674 100644 (file)
@@ -60,7 +60,6 @@
 int bbs_gen(bbs_priv *bp, unsigned nbits, grand *r, unsigned n,
            pgen_proc *event, void *ectx)
 {
-  rabin rb;
   pfilt jp;
   pgen_jumpctx j;
   pgen_gcdstepctx g;
@@ -73,7 +72,7 @@ int bbs_gen(bbs_priv *bp, unsigned nbits, grand *r, unsigned n,
     goto fail_x;
   j.j = &jp;
   bp->p = pgen("p", MP_NEWSEC, x, event, ectx, n, pgen_jump, &j,
-              rabin_iters(nb), pgen_test, &rb);
+              PGEN_BAILLIEPSWNTESTS, pgen_bailliepswtest, 0);
   pfilt_destroy(&jp);
   if (!bp->p) goto fail_p;
 
@@ -89,7 +88,7 @@ int bbs_gen(bbs_priv *bp, unsigned nbits, grand *r, unsigned n,
   g.g = MP_NEW;
   g.max = MP_ONE;
   bp->q = pgen("q", MP_NEWSEC, x, event, ectx, n, pgen_gcdstep, &g,
-              rabin_iters(nb), pgen_test, &rb);
+              PGEN_BAILLIEPSWNTESTS, pgen_bailliepswtest, 0);
   pfilt_destroy(&g.jp);
   mp_drop(g.r);
   mp_drop(g.g);