A Few Elliptic Curve Plots

Math 302 Cryptography, March 20, 2017
T. Ratliff, Wheaton College
ratliff_thomas@wheatoncollege.edu

Use Manipulate[ ] to plot (Y^2)=(X^3)+A X+B

Manipulate[ContourPlot[(Y^2)==(X^3)+A X+B,{X,-4,8},{Y,-20,20},PlotTheme->"Scientific"],{A,5,InputField},{B,6,InputField},LabelStyle->Directive[Blue,Large],FrameLabel->Style["(Y^2) = (X^3)+ AX + B",{Red,Large}]]

Notice that A=-3 B=2 illustrates why we need the condition 4(A^3)+27(B^2)≠ 0

Find all points on an elliptic curve E : (Y^(2 ))= (X^3)+AX + B over (Subscript[𝔽, p])

This is a naive, brute-force procedure that doesn’t work well for large primes.

ellPoints[A_,B_,p_]:= Module[ {X,Y,ell,pointList,i,j,p1}, 
ell =(Mod[ Y^2,p]== Mod[X^3 + A*X + B,p]);

pointList={O};
For[ i=0,i<p, i++, 
For[j=0, j<p,j++,
If[ ell/.{X->i,Y->j}, AppendTo[pointList,{i,j}]]
]];
Print["There are ", Length[pointList]," points on (Y^2) = (X^3) + ", A,"X + ",B," in F_",p];
Return[pointList];];

ell17=ellPoints[-5,6,17]

ListPlot[ell17]