From 32fec2a25d06af77ab7ed91fd3047ef638d8d883 Mon Sep 17 00:00:00 2001 From: mdw Date: Mon, 3 Jul 2000 18:09:27 +0000 Subject: [PATCH] Bug fix to the GCD check. With any luck, this is the last of these to need nailing to the wall. --- pgen-safe.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pgen-safe.c b/pgen-safe.c index b680ae4..03ba35a 100644 --- a/pgen-safe.c +++ b/pgen-safe.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pgen-safe.c,v 1.3 2000/06/17 11:52:36 mdw Exp $ + * $Id: pgen-safe.c,v 1.4 2000/07/03 18:09:27 mdw Exp $ * * Safe prime generation * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: pgen-safe.c,v $ + * Revision 1.4 2000/07/03 18:09:27 mdw + * Bug fix to the GCD check. With any luck, this is the last of these to + * need nailing to the wall. + * * Revision 1.3 2000/06/17 11:52:36 mdw * Signal a pgen abort if the jump and base share a common factor. * @@ -133,7 +137,7 @@ int pgen_safejump(int rq, pgen_event *ev, void *p) if ((p->v[0] & 3) != 3) p = mp_add(p, p, j->jq.m); q = mp_lsr(MP_NEW, p, 1); - mp_gcd(&g, 0, 0, q, j->jq.m); + mp_gcd(&g, 0, 0, p, j->jq.m); if (MP_CMP(g, >, MP_ONE)) { ev->m = p; mp_drop(q); -- 2.11.0