Uprating of the passphrase pixie.
[u/mdw/catacomb] / prim.c
diff --git a/prim.c b/prim.c
index 31ef919..79ab731 100644 (file)
--- a/prim.c
+++ b/prim.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: prim.c,v 1.2 2000/07/29 09:57:42 mdw Exp $
+ * $Id: prim.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
  *
  * Finding primitive elements
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: prim.c,v $
- * Revision 1.2  2000/07/29 09:57:42  mdw
- * Improve primitive-element testing a lot.  Now much more sensible and
- * orthogonal: you can find a generator for any given subgroup order by
- * putting in the appropriate parameters.
- *
- * Revision 1.1  1999/12/22 15:58:59  mdw
- * Search for primitive elements using prime-search equipment.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include "mp.h"
@@ -69,7 +56,7 @@ int prim_test(int rq, pgen_event *ev, void *p)
         x = mp_copy(ev->m);
       else {
        x = mpmont_exp(&c->mm, MP_NEW, ev->m, c->exp);
-       if (MP_CMP(x, ==, MP_ONE))
+       if (MP_EQ(x, MP_ONE))
          goto done;
       }
       if (c->n == 0)
@@ -80,7 +67,7 @@ int prim_test(int rq, pgen_event *ev, void *p)
        mp *y = MP_NEW;
        while (n) {
          y = mpmont_exp(&c->mm, y, x, *f);
-         if (MP_CMP(y, ==, MP_ONE)) {
+         if (MP_EQ(y, MP_ONE)) {
            mp_drop(y);
            goto done;
          }