8 int main(int argc, char *argv[])
10 mp *p, *q, *g, *gg, *t, *h;
18 q = mp_readstring(MP_NEW, argv[1], 0, 0);
20 for (i = 2; i < argc; i++) {
21 t = mp_lsl(t, MP_ONE, atoi(argv[i]));
24 gfreduce_create(&r, p);
25 t = mp_lsl(t, MP_ONE, mp_bits(p) - 1);
26 t = mp_sub(t, t, MP_ONE);
33 g = gfreduce_exp(&r, g, gg, h);
34 t = gfreduce_exp(&r, t, g, q);
35 if (MP_EQ(t, MP_ONE) && !MP_EQ(g, MP_ONE)) {
39 grp = group_binary(&gb);
41 if ((e = G_CHECK(grp, &rand_global)) != 0) {
42 fprintf(stderr, "badness: %s\n", e);
45 fputs(" p 0x", stdout);
46 mp_writefile(p, stdout, 16);
48 fputs(" q 0x", stdout);
49 mp_writefile(q, stdout, 16);
51 fputs(" g 0x", stdout);
52 mp_writefile(g, stdout, 16);
56 gg = mp_add(gg, gg, MP_ONE);