# [Ecm-commits] r2590 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Sun Feb 8 21:21:32 CET 2015

```Author: zimmerma
Date: 2015-02-08 21:21:32 +0100 (Sun, 08 Feb 2015)
New Revision: 2590

Modified:
trunk/parametrizations.c
Log:
added Sage code to find group order for -param 2

Modified: trunk/parametrizations.c
===================================================================
--- trunk/parametrizations.c	2015-02-08 14:48:13 UTC (rev 2589)
+++ trunk/parametrizations.c	2015-02-08 20:21:32 UTC (rev 2590)
@@ -275,7 +275,21 @@
using Jacobian coordinates; formulae were found at
https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
Then we let x3 = (3*x+y+6)/(2*(y-3)), A = -(3*x3^4+6*x3^2-1)/(4*x3^3) and
-  x0 = 2 */
+  x0 = 2. The Sage code below gives the factored group order:
+
+  def FindGroupOrderParam2(p,sigma):
+   K = GF(p)
+   E = EllipticCurve(K,[0,36])
+   P = sigma*E(-3,3)
+   x,y = P.xy()
+   x3 = (3*x+y+6)/(2*(y-3))
+   A = -(3*x3^4+6*x3^2-1)/(4*x3^3)
+   d = K((A+2)/4)
+   a = K(4*d-2)
+   b = K(16*d+2)
+   E = EllipticCurve(K,[0,a/b,0,1/b^2,0])
+   return factor(E.cardinality())
+*/
int
get_curve_from_param2 (mpz_t f, mpres_t A, mpres_t x0, mpz_t sigma, mpmod_t n)
{

```