From: mdw Date: Thu, 1 Apr 2004 13:37:07 +0000 (+0000) Subject: Keep numbers positive. X-Git-Tag: 2.1.0~5 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/3aed8f709a80d81173e9a46024fee4f274acbbe6 Keep numbers positive. --- diff --git a/calc/ecp.cal b/calc/ecp.cal index 3834359d..10ed9e47 100644 --- a/calc/ecp.cal +++ b/calc/ecp.cal @@ -1,6 +1,6 @@ /* -*-apcalc-*- * - * $Id: ecp.cal,v 1.3 2004/03/23 15:19:32 mdw Exp $ + * $Id: ecp.cal,v 1.4 2004/04/01 13:37:07 mdw Exp $ * * Testbed for elliptic curve arithmetic over prime fields * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: ecp.cal,v $ + * Revision 1.4 2004/04/01 13:37:07 mdw + * Keep numbers positive. + * * Revision 1.3 2004/03/23 15:19:32 mdw * Test elliptic curves more thoroughly. * @@ -126,7 +129,7 @@ define ecp_pt_neg(a) { local obj ecp_pt d; d.x = a.x; - d.y = -a.y; + d.y = a.e.p - a.y; d.e = a.e; return (d); }