General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / ec-test.c
index 1307e32..30d1069 100644 (file)
--- a/ec-test.c
+++ b/ec-test.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: ec-test.c,v 1.4 2004/04/01 12:50:09 mdw Exp $
+ * $Id$
  *
  * Code for testing elliptic-curve stuff
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: ec-test.c,v $
- * Revision 1.4  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.3  2004/03/27 17:54:11  mdw
- * Standard curves and curve checking.
- *
- * Revision 1.2  2004/03/27 00:04:46  mdw
- * Implement efficient reduction for pleasant-looking primes.
- *
- * Revision 1.1  2004/03/23 15:19:32  mdw
- * Test elliptic curves more thoroughly.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <assert.h>
@@ -123,7 +102,7 @@ static int ecSAMEP(ec_curve *cc, ec_curve *dd)
   return (ec_samep(c->real, d->real));
 }
 
-static ec_ops ecops = {
+static const ec_ops ecops = {
   ecDESTROY, ecSAMEP, ecIN, ecOUT, ecFIX,
   ecFIND, ecNEG, ecADD, ecSUB, ecDBL, ecCHECK
 };
@@ -173,7 +152,7 @@ static void ecvdump(dstr *d, FILE *fp)
   fprintf(fp, "%s", ec_name(v));
 }
 
-test_type type_ecurve = { ecvcvt, ecvdump };
+const test_type type_ecurve = { ecvcvt, ecvdump };
 
 static void eccvt(const char *p, dstr *d)
 {
@@ -210,7 +189,7 @@ static void ecdump(dstr *d, FILE *fp)
   ecdodump(a, fp);
 }
 
-test_type type_ec = { eccvt, ecdump };
+const test_type type_ec = { eccvt, ecdump };
 
 /*----- Testing elliptic curve functionality ------------------------------*/