X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/a30942cc806b11f8ddca146c16a46b69a4b6ef52..c65df27983057ec76ed0e72bb370f9a5ae7dad28:/strongprime.h diff --git a/strongprime.h b/strongprime.h index 6f06cda..ba5a9a5 100644 --- a/strongprime.h +++ b/strongprime.h @@ -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 * @@ -27,14 +27,6 @@ * 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 @@ -54,6 +46,30 @@ /*----- 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