~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prime generation: Deploy the new Baillie--PSW testers.
[catacomb]
/
pub
/
dh-gen.c
diff --git
a/pub/dh-gen.c
b/pub/dh-gen.c
index
17b34f6
..
f20c286
100644
(file)
--- 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,
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_simul
test, &ss);
+
PGEN_BAILLIEPSWNTESTS, pgen_simulbailliepsw
test, &ss);
mp_drop(m);
if (!dp->q) {
mp_drop(sp[1].u.x);
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;
else {
pgen_filterctx c;
pgen_jumpctx j;
- rabin rb;
prim_ctx p;
int i;
mp *m = MP_NEW;
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,
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;
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,
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)
pfilt_destroy(&c.f);
mp_drop(x);
if (!dp->p)