Ask Your Question

Find order of an Elliptic Curve over Gaussian Integer

asked 2020-02-07 08:18:05 +0200

ed gravatar image

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])

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-07 10:08:51 +0200

rburing gravatar image

updated 2020-02-07 12:11:43 +0200

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])

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)

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.

edit flag offensive delete link more



Wow, Thank you very much !

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2020-02-07 08:18:05 +0200

Seen: 459 times

Last updated: Feb 07 '20