X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/34e4f738bcba58e6d8c4cabbb0b3232a65b42a9d..b817bfc642225b8c3c0b6a7e42d1fb949b61a606:/field.h diff --git a/field.h b/field.h index bf0428a..5790284 100644 --- a/field.h +++ b/field.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: field.h,v 1.9 2004/04/01 12:50:09 mdw Exp $ + * $Id: field.h,v 1.11 2004/04/08 01:36:15 mdw Exp $ * * Definitions for field arithmetic * @@ -27,48 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: field.h,v $ - * Revision 1.9 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.8 2004/03/27 17:54:11 mdw - * Standard curves and curve checking. - * - * Revision 1.7 2004/03/27 00:04:46 mdw - * Implement efficient reduction for pleasant-looking primes. - * - * Revision 1.6 2004/03/23 15:19:32 mdw - * Test elliptic curves more thoroughly. - * - * Revision 1.5 2004/03/23 12:08:26 mdw - * Random field-element selection. - * - * Revision 1.4 2004/03/21 22:52:06 mdw - * Merge and close elliptic curve branch. - * - * Revision 1.3.4.2 2004/03/21 22:39:46 mdw - * Elliptic curves on binary fields work. - * - * Revision 1.3.4.1 2004/03/20 00:13:31 mdw - * Projective coordinates for prime curves - * - * Revision 1.3 2002/01/13 13:48:44 mdw - * Further progress. - * - * Revision 1.2 2001/05/07 17:30:13 mdw - * Add an internal-representation no-op function. - * - * Revision 1.1 2001/04/29 18:12:33 mdw - * Prototype version. - * - */ - #ifndef CATACOMB_FIELD_H #define CATACOMB_FIELD_H @@ -250,6 +208,20 @@ extern field *field_niceprime(mp */*p*/); extern field *field_binpoly(mp */*p*/); +/* --- @field_binnorm@ --- * + * + * Arguments: @mp *p@ = the reduction polynomial + * @mp *beta@ = representation of normal point + * + * Returns: A pointer to the field. + * + * Use: Creates a field structure for a binary field mod @p@ which + * uses a normal basis representation externally. Computations + * are still done on a polynomial-basis representation. + */ + +extern field *field_binnorm(mp */*p*/, mp */*beta*/); + /* --- @field_parse@ --- * * * Arguments: @qd_parse *qd@ = parser context @@ -258,9 +230,10 @@ extern field *field_binpoly(mp */*p*/); * * Use: Parses a field description, which has the form * - * * `prime', `niceprime' or `binpoly' + * * `prime', `niceprime', `binpoly', or `binnorm' * * an optional `:' * * the field modulus + * * for `binnorm', an optional `,' and the beta value */ extern field *field_parse(qd_parse */*qd*/);