1

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.

abrahamxyz
  • 11
  • 2
  • Does SageMath is fine? [Graphically representing points on Elliptic Curve over finite field](https://crypto.stackexchange.com/a/87545/18298). Listing all of the points is dangerous if `p` is a huge number. – kelalaka Apr 07 '21 at 12:43
  • Yes, ofcourse but I wonder how it's done. Maybe there is a generator that generates all points without save them in a list – abrahamxyz Apr 07 '21 at 12:55

1 Answers1

0

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

kelalaka
  • 5,064
  • 5
  • 27
  • 44