Sage usage to calculate a cardinality

615 Views Asked by At

I would like to compute the cardinality of an elliptic curve group over the finite field $\mathbb{F}_{991}$. I'm trying to use sage but I still have an error in the syntax (I never used it before and I tryed to adapt a code). Here is what I have:

sage: E = EllipticCurve(GF(991))

sage: E

Elliptic Curve defined by y^2 = x^3 + 446*x + 471 over Finite Field of order 991

Does some one know how I should modify it?

2

There are 2 best solutions below

5
On BEST ANSWER

This is the wrong place to ask and in future, you should ask on ask.sagemath.org.

To answer your question, you can find the cardinality by typing

sage: E.cardinality()

But, you need to first input your curve, say you have an elliptic curve given by $$E: y^2+a_1xy+a_3y=x^3+a_2x^2+a_4x+a_6 \text{ over } GF(p)$$

Then, do this,

sage: E=EllipticCurve(GF(p),[a_1,a_2,a_3,a_4,a_6])
sage: E.cardinality()

Hope this helped.

0
On

Alternatively, you can use MAGMA online. I usually do it like this:

K:=GF(991);

g:=Generator(K);

E:=EllipticCurve([0,0,0,446*g,471*g]);

#E;

and MAGMA returns 984.