/* -*-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
*/
/*----- 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.
*
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 {
typedef struct ecentry {
const char *name;
- const ecdata *data;
+ ecdata *data;
} ecentry;
/*----- Global variables --------------------------------------------------*/