X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/bbe59354d97fa30184f6a95cf1f31ce447d0fa29..fbfcb6c0ffbad26c7eae30a7590e9d7897331a31:/pub/dh-gen.c diff --git a/pub/dh-gen.c b/pub/dh-gen.c index 17b34f68..f20c286d 100644 --- a/pub/dh-gen.c +++ b/pub/dh-gen.c @@ -80,7 +80,7 @@ int dh_gen(dh_param *dp, unsigned ql, unsigned pl, unsigned steps, grand *r, sp[1].mul = MP_TWO; sp[1].add = MP_ONE; sp[1].f = PGENF_KEEP; ss.v = sp; ss.n = N(sp); dp->q = pgen("p", MP_NEW, m, event, ectx, steps, pgen_simulstep, &ss, - rabin_iters(pl), pgen_simultest, &ss); + PGEN_BAILLIEPSWNTESTS, pgen_simulbailliepswtest, &ss); mp_drop(m); if (!dp->q) { mp_drop(sp[1].u.x); @@ -99,7 +99,6 @@ int dh_gen(dh_param *dp, unsigned ql, unsigned pl, unsigned steps, grand *r, else { pgen_filterctx c; pgen_jumpctx j; - rabin rb; prim_ctx p; int i; mp *m = MP_NEW; @@ -110,7 +109,7 @@ int dh_gen(dh_param *dp, unsigned ql, unsigned pl, unsigned steps, grand *r, c.step = 2; m = mprand(MP_NEW, ql, r, 1); dp->q = pgen("q", MP_NEW, m, event, ectx, steps, pgen_filter, &c, - rabin_iters(ql), pgen_test, &rb); + PGEN_BAILLIEPSWNTESTS, pgen_bailliepswtest, 0); if (!dp->q) goto fail_q; @@ -125,7 +124,7 @@ int dh_gen(dh_param *dp, unsigned ql, unsigned pl, unsigned steps, grand *r, pfilt_create(&c.f, m); j.j = &c.f; dp->p = pgen("p", MP_NEW, x, event, ectx, steps, pgen_jump, &j, - rabin_iters(pl), pgen_test, &rb); + PGEN_BAILLIEPSWNTESTS, pgen_bailliepswtest, 0); pfilt_destroy(&c.f); mp_drop(x); if (!dp->p)