X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/df0292de3999245f136b6d8ae44a1404282b7fdb..1589affab225db500965e2cb869c534d6860e6bd:/pgen.h diff --git a/pgen.h b/pgen.h index 459f360..1834f03 100644 --- a/pgen.h +++ b/pgen.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pgen.h,v 1.7 2000/08/18 19:16:12 mdw Exp $ + * $Id: pgen.h,v 1.8 2004/04/01 12:50:09 mdw Exp $ * * Prime generation glue * @@ -30,6 +30,13 @@ /*----- Revision history --------------------------------------------------* * * $Log: pgen.h,v $ + * Revision 1.8 2004/04/01 12:50:09 mdw + * Add cyclic group abstraction, with test code. Separate off exponentation + * functions for better static linking. Fix a buttload of bugs on the way. + * Generally ensure that negative exponents do inversion correctly. Add + * table of standard prime-field subgroups. (Binary field subgroups are + * currently unimplemented but easy to add if anyone ever finds a good one.) + * * Revision 1.7 2000/08/18 19:16:12 mdw * New event handler for showing in detail sub-prime generation. * @@ -293,6 +300,16 @@ extern mp *pgen(const char */*name*/, mp */*d*/, mp */*m*/, unsigned /*steps*/, pgen_proc */*step*/, void */*sctx*/, unsigned /*tests*/, pgen_proc */*test*/, void */*tctx*/); +/* --- @pgen_primep@ --- * + * + * Arguments: @mp *p@ = a number to check + * @grand *gr@ = a random number source + * + * Returns: Nonzero if @p@ is really prime. + */ + +extern int pgen_primep(mp */*p*/, grand */*gr*/); + /*----- That's all, folks -------------------------------------------------*/ #ifdef __cplusplus