Ask Your Question
1

Find order of an Elliptic Curve over Gaussian Integer

asked 2020-02-07 01:18:05 -0500

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

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-02-07 03:08:51 -0500

rburing gravatar image

updated 2020-02-07 05:11:43 -0500

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.

edit flag offensive delete link more

Comments

1

Wow, Thank you very much !

ed gravatar imageed ( 2020-02-07 14:03:21 -0500 )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

Stats

Asked: 2020-02-07 01:18:05 -0500

Seen: 91 times

Last updated: Feb 07