nzmath.elliptic
The class is for elliptic curves over finite field. It is also called Galois Field (GF).
The class is a subclass of ECGeneric.
All elements of Weierstrass list form have to be an object inheriting finitefield.FiniteFieldElement or an Python long integer.
basefield has to be a prime number or an object inheriting finitefield.FiniteField .
if basefield is prime number, Constructor automatically create finite prime field (e.g. finitefield.FinitePrimeField(p)).
if Weierstrass list form is a list of Python long integer, constructor will automatically convert by basefield.createElement method.
In general, given EC characteristic or basefield specified, you should call EC for your profit. It is not recommended to call this class directly.
Returns a random point on elliptic curve.
Returns the order of point P. Algorithm uses factorization of order().
computes t such that #E(Fq)=q+1-t, where #E(Fq) stands for the number of points of elliptic curve over Fq. This uses the Schoof's method.
computes t such that #E(Fq)=q+1-t, where #E(Fq) stands for the number of points of elliptic curve over Fq. This uses the Shanks-Mestre method.
computes t such that #E(Fq)=p+1-t, where #E(Fq) stands for the number of points of elliptic curve over Fq. This uses the Legendre-symbol method.
computes #E(Fq). If p<1000, this uses the Legendre method. If 10^4<p<10^30, this uses the Shanks-Mestre method. Otherwise, it uses Schoof's method. If flag=r, this computes #E(Fq^r) .
returns Tate Pairing <P,Q>_m by using Miller's algorithm.
the point on elliptic curve P has to be a m-torsion point (e.g. mP=[0]).
also the number m must be dividing order of curve.
returns Tate Pairing with final exponentation, that is T_m(P,Q):=<P,Q>_m^((q-1)/m) by using Miller's algorithm.
returns Weil Pairing e_m(P,Q) by using Miller's algorithm.
the number m must be dividing order of curve, and the point on elliptic curve P, Q have to be a m-torsion point (e.g. mP=[0]).
returns scalar m such that mP=[0].
Because of failure to apply BSGS to small group, call pointorder(P) instead of BSGS Algorithms if order of finite field is less than 40.
returns scalar m such that Q=mP. P, Q are in the subgroup of order n if exists, otherwise returns False.
returns the group structure (n1, n2) of the E(Fq) by using Weil Pairing.