/* -*-c-*-
*
- * $Id: pgen.h,v 1.5 2000/02/12 18:21:03 mdw Exp $
+ * $Id: pgen.h,v 1.6 2000/06/17 11:52:12 mdw Exp $
*
* Prime generation glue
*
/*----- Revision history --------------------------------------------------*
*
* $Log: pgen.h,v $
+ * Revision 1.6 2000/06/17 11:52:12 mdw
+ * Add the GCD filter.
+ *
* Revision 1.5 2000/02/12 18:21:03 mdw
* Overhaul of key management (again).
*
extern int pgen_safetest(int /*rq*/, pgen_event */*ev*/, void */*p*/);
+/*----- Miscellaneous steppers and testers --------------------------------*/
+
+typedef struct pgen_gcdstepctx {
+ pfilt p, jp; /* Prime filter and step filter */
+ mp *q, *jq; /* %$p - 1$%, and a step value*/
+ mp *r; /* Other argument for GCD */
+ mp *g; /* GCD output (must be inited) */
+ mp *max; /* Maximum permissible GCD */
+} pgen_gcdstepctx;
+
+/* --- @pgen_gcdstep@ --- *
+ *
+ * Steps @p@ and @q@, until @p@ has no small factors, and
+ * %$\gcd(p, r) \le max$%.
+ */
+
+extern int pgen_gcdstep(int /*rq*/, pgen_event */*ev*/, void */*p*/);
+
/*----- Standard event handlers -------------------------------------------*/
/* --- @pgen_evspin@ --- *