# Find order of an Elliptic Curve over Gaussian Integer

I am new with Sagemath. I just find out that Sagemath has Elliptic Curve Library and I curious to find out how to find order of an elliptic curve over Gaussian Integer.

p = 107927
G = ZZ[I]
J = G.ideal(p)
Q = G.quotient(J,'x')
a = Q(I)

A = (95385+100114*a)
B = (18724+61222*a)
E = EllipticCurve(Q,[A, B])
E


it will show : Elliptic Curve defined by y^2 = x^3 + (-7813I-12542)x + (-46705I+18724) over Quotient of Gaussian Integers in Number Field in I with defining polynomial x^2 + 1 with I = 1I by the ideal (107927)

E.cardinality() AttributeError: 'EllipticCurve_field_with_category' object has no attribute 'cardinality'

why it shows an error ? I found the group order is 11648283482 (using python and the program that I made from scratch)



edit retag close merge delete

Sort by » oldest newest most voted

While the quotient you constructed is a valid object, it seems to be not the optimal way to construct the respective mathematical object. Apparently, general quotients of the Gaussian integers ZZ[I] currently have only barebones functionality; SageMath doesn't even know when they are finite. However, since p is prime (hence maximal) in ZZ[I] we can compute the residue_field instead (which is a much better implementation of the quotient):

p = 107927
G = ZZ[I]
J = G.ideal(p)
Q.<a> = G.residue_field(J)

A = (95385+100114*a)
B = (18724+61222*a)
E = EllipticCurve(Q,[A, B])
print(E)
print(E.cardinality())


It outputs:

Elliptic Curve defined by y^2 = x^3 + (100114*a+95385)*x + (61222*a+18724) over Residue field in a of Fractional ideal (107927)
11648283482


as you predicted.

Alternatively, making use of the third isomorphism theorem:

p = 107927
Q.<a> = GF(p^2, modulus=x^2+1)
`

This is possibly even faster.

more

1

Wow, Thank you very much !

( 2020-02-07 21:03:21 +0200 )edit