/* -*-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
*
* (c) 1999 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Catacomb.
*
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
- *
+ *
* Catacomb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Library General Public
* License along with Catacomb; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* 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