Pollard's rho algorithm for computing discrete logs.
[u/mdw/catacomb] / strongprime.h
index 6f06cda..0b53a79 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: strongprime.h,v 1.1 1999/12/22 15:51:22 mdw Exp $
+ * $Id: strongprime.h,v 1.2 2000/02/12 18:21:03 mdw Exp $
  *
  * Generate `strong' prime numbers
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: strongprime.h,v $
+ * Revision 1.2  2000/02/12 18:21:03  mdw
+ * Overhaul of key management (again).
+ *
  * Revision 1.1  1999/12/22 15:51:22  mdw
  * Find `strong' RSA primes using Gordon's algorithm.
  *
 
 /*----- Functions provided ------------------------------------------------*/
 
+/* --- @strongprime_setup@ --- *
+ *
+ * Arguments:  @const char *name@ = pointer to name root
+ *             @mp *d@ = destination for search start point
+ *             @pfilt *f@ = where to store filter jump context
+ *             @unsigned nbits@ = number of bits wanted
+ *             @grand *r@ = random number source
+ *             @unsigned n@ = number of attempts to make
+ *             @pgen_proc *event@ = event handler function
+ *             @void *ectx@ = argument for the event handler
+ *
+ * Returns:    A starting point for a `strong' prime search, or zero.
+ *
+ * Use:                Sets up for a strong prime search, so that primes with
+ *             particular properties can be found.  It's probably important
+ *             to note that the number left in the filter context @f@ is
+ *             congruent to 2 (mod 4).
+ */
+
+extern mp *strongprime_setup(const char */*name*/, mp */*d*/, pfilt */*f*/,
+                            unsigned /*nbits*/, grand */*r*/,
+                            unsigned /*n*/, pgen_proc */*event*/,
+                            void */*ectx*/);
+
 /* --- @strongprime@ --- *
  *
  * Arguments:  @const char *name@ = pointer to name root