cleanup: Big pile of whitespace fixes, all at once.
[u/mdw/catacomb] / calc / ec2.cal
index 0d7ceb9..e43c61b 100644 (file)
@@ -1,13 +1,13 @@
 /* -*-apcalc-*-
  *
- * $Id: ec2.cal,v 1.1.2.1 2004/03/21 22:39:46 mdw Exp $
+ * $Id: ec2.cal,v 1.4 2004/04/08 01:36:15 mdw Exp $
  *
  * Testbed for elliptic curve arithmetic over binary fields
  *
  * (c) 2004 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Catacomb.
  *
  * it under the terms of the GNU Library General Public License as
  * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
- * 
+ *
  * Catacomb is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU Library General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU Library General Public
  * License along with Catacomb; if not, write to the Free
  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: ec2.cal,v $
- * Revision 1.1.2.1  2004/03/21 22:39:46  mdw
- * Elliptic curves on binary fields work.
- *
- * Revision 1.1.4.2  2004/03/20 00:13:31  mdw
- * Projective coordinates for prime curves
- *
- * Revision 1.1.4.1  2003/06/10 13:43:53  mdw
- * Simple (non-projective) curves over prime fields now seem to work.
- *
- * Revision 1.1  2000/10/08 16:01:37  mdw
- * Prototypes of various bits of code.
- *
- */
-
 /*----- Object types ------------------------------------------------------*/
 
 obj ec2_curve { a, b, p };
@@ -80,7 +63,6 @@ define ec2_pt_add(a, b)
   local e, alpha;
   local obj ec2_pt d;
 
-  print "> ecadd: ", a, b;
   if (a == 0)
     d = b;
   else if (b == 0)
@@ -104,7 +86,6 @@ define ec2_pt_add(a, b)
     d.e = e;
   }
 
-  print "< ecadd: ", d;
   return (d);
 }
 
@@ -112,7 +93,6 @@ define ec2_pt_dbl(a)
 {
   local e, alpha;
   local obj ec2_pt d;
-  print "> ecdbl: ", a;
   if (istype(a, 1))
     return (0);
   e = a.e;
@@ -120,7 +100,6 @@ define ec2_pt_dbl(a)
   d.x = (e.a + alpha^2 + alpha) % e.p;
   d.y = ((a.x + d.x) * alpha + d.x + a.y) % e.p;
   d.e = e;
-  print "< ecdbl: ", d;
   return (d);
 }