X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/a30942cc806b11f8ddca146c16a46b69a4b6ef52..f41f820e4b3e230d9314cc4323abf59babdd4e67:/strongprime.h diff --git a/strongprime.h b/strongprime.h index 6f06cda..0b53a79 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.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. * @@ -54,6 +57,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