General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / strongprime.h
index 6f06cda..ba5a9a5 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.3 2004/04/08 01:36:15 mdw Exp $
  *
  * Generate `strong' prime numbers
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: strongprime.h,v $
- * Revision 1.1  1999/12/22 15:51:22  mdw
- * Find `strong' RSA primes using Gordon's algorithm.
- *
- */
-
 #ifndef CATACOMB_STRONGPRIME_H
 #define CATACOMB_STRONGPRIME_H
 
 
 /*----- 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