X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/1ba83484ee5bb486da9aa958576de4bc29ef0c1d..34e4f738bcba58e6d8c4cabbb0b3232a65b42a9d:/ectab.h diff --git a/ectab.h b/ectab.h index d8d4302..925924d 100644 --- a/ectab.h +++ b/ectab.h @@ -1,8 +1,8 @@ /* -*-c-*- * - * $Id: ectab.h,v 1.1 2004/03/27 17:54:11 mdw Exp $ + * $Id: ectab.h,v 1.2 2004/04/01 12:50:09 mdw Exp $ * - * Table of standard elliptic curves (internal) + * Table of standard elliptic curves * * (c) 2004 Straylight/Edgeware */ @@ -30,6 +30,13 @@ /*----- Revision history --------------------------------------------------* * * $Log: ectab.h,v $ + * Revision 1.2 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.1 2004/03/27 17:54:11 mdw * Standard curves and curve checking. * @@ -50,13 +57,11 @@ typedef struct ecdata { unsigned ftag; /* The kind of curve this is */ - const mpw *p; size_t psz; /* Modulus */ - const mpw *a; size_t asz; /* Elliptic curve parameters */ - const mpw *b; size_t bsz; - const mpw *r; size_t rsz; /* Order of common point %$g$% */ - const mpw *h; size_t hsz; /* Cofactor %$h = \#E/r$% */ - const mpw *gx; size_t gxsz; /* Common point */ - const mpw *gy; size_t gysz; + mp p; /* Modulus */ + mp a, b; /* Elliptic curve parameters */ + mp r; /* Order of common point %$g$% */ + mp h; /* Cofactor %$h = \#E/r$% */ + mp gx, gy; /* Common point */ } ecdata; enum { @@ -67,7 +72,7 @@ enum { typedef struct ecentry { const char *name; - const ecdata *data; + ecdata *data; } ecentry; /*----- Global variables --------------------------------------------------*/