abrahamxyz
abrahamxyz

Reputation: 11

How can i draw graph of Elliptic Curve mod p by using pari-gp?

Suppose E:y^2=x^3+Ax+B mod p, I have two questions?

  1. how can I draw the graph of E with pari-gp.

  2. how can I get the list of all points over the E. thank you for all.

Upvotes: 1

Views: 509

Answers (1)

kelalaka
kelalaka

Reputation: 5636

To define an Elliptic Curve with SageMath use

E = EllipticCurve(GF(131),[0,1,0,1,0])
print(E)

and outputs

Elliptic Curve defined by y^2 = x^3 + x^2 + x over Finite Field of size 131

In your case ( simplified Weierstrass from)

E = EllipticCurve(GF(p),[A,B])

will be enough.

To plot a curve

E.plot()

is enough

To iterate the points

for T in E.points():
    print(T)

is enough.


Try online on SageMathCell.

enter image description here

And notice the symmetry!

Pari-GP

From a tutorial

a=ffgen(P,’a)
Es = ellinit([a^4,a^6],a);

Upvotes: 0

Related Questions