[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Operations on Points

Points on an elliptic curve over a field are given in terms of projective coordinates: a point (a, b, c) is equivalent to (x, y, z) if and only if there exists an element u (in the field of definition) such that ua=x, ub=y, and uc=z. The equivalence class of (x, y, z) is denoted by the projective point (x:y:z). At least one of the projective coordinates must be nonzero. We call the coefficients normalized if either z=1, or z=0 and y=1.

Subsections

Creation of Points

In this section the descriptions will refer to a point set H, which is either the H in the signature or the base point set of the elliptic curve E in the signature.

H ! [x, y, z] : SetPtEll, [ RngElt ] -> PtEll
elt< H | x, y, z > : SetPtEll, RngElt, RngElt, RngElt -> PtEll
E ! [x, y, z] : CrvEll, [ RngElt ] -> PtEll
elt< E | x, y, z > : CrvEll, RngElt, RngElt, RngElt -> PtEll
Given a point set H=E(R) and coefficients x, y, z in R satisfying the equation for E, return the normalized point P=(x:y:z) in H. If z is not specified it is assumed to be 1. everypar{hangindent=0pt hangafter=0}
H ! 0 : SetPtEll, RngIntElt -> PtEll
Id(H) : SetPtEll -> PtEll
Identity(H) : SetPtEll -> PtEll
E ! 0 : CrvEll, RngIntElt -> PtEll
Id(E) : CrvEll -> PtEll
Identity(E) : CrvEll -> PtEll
Return the normalized identity point (0:1:0) of the point set H.
Points(H, x) : SetPtEll, RngElt -> [ PtEll ]
Points(E, x) : CrvEll, RngElt -> [ PtEll ]
Returns the sequence of points in H whose x-coordinate is x.
PointsAtInfinity(H) : SetPtEll -> @ PtEll @
PointsAtInfinity(E) : CrvEll -> @ PtEll @
Returns the indexed set containing the identity point of H.

Creation Predicates

IsPoint(H, S) : SetPtEll, [ RngElt ] -> BoolElt, PtEll
IsPoint(E, S) : CrvEll, [ RngElt ] -> BoolElt, PtEll
Returns true if the sequence of values in S are the coordinates of a point in H, false otherwise. If this is true, then the corresponding point is returned as the second value.
IsPoint(H, x) : SetPtEll, RngElt -> BoolElt, PtEll
IsPoint(E, x) : CrvEll, RngElt -> BoolElt, PtEll
Returns true if x is the x-coordinate of a point in H, false otherwise. If this is true, then a corresponding point is returned as the second value. Note that the point at infinity of H will never be returned.

Access Operations

P[i] : PtEll, RngIntElt -> RngElt
Access the i-th coefficient for an elliptic curve point P, for 1 <= i <= 3.
ElementToSequence(P): PtEll -> [ RngElt ]
EltSeq(P): PtEll -> [ RngElt ]
Given a point P on an elliptic curve, this function returns a sequence of length 3 consisting of its coefficients (normalized).

Associated Structures

Category(P) : PtEll -> Cat
Type(P) : PtEll -> Cat
Returns the category of elliptic curve points, PtEll.
Parent(P) : PtEll -> SetPtEll
Returns the parent point set for the point P.
Scheme(P) : SetPtEll -> CrvEll
Curve(P) : SetPtEll -> CrvEll
Returns the corresponding scheme or elliptic curve for the parent point set of P.

Arithmetic

The points on an elliptic curve over a field form an abelian group, for which we use the additive notation. The identity element is the point O = (0:1:0).

- P : PtEll -> PtEll
The additive inverse of the point P on an elliptic curve E.
P + Q : PtEll, PtEll -> PtEll
Returns the sum P + Q of two points P and Q on the same elliptic curve.
P +:= Q : PtEll, PtEll ->
Given two points P and Q on the same elliptic curve, set P equal to their sum.
P - Q : PtEll, PtEll -> PtEll
Returns the difference P - Q of two points P and Q on the same elliptic curve.
P -:= Q : PtEll, PtEll ->
Given two points P and Q on the same elliptic curve, set P equal to their difference.
n * P : RngIntElt, PtEll -> PtEll
P * n : PtEll, RngIntElt -> PtEll
Returns the n-th multiple of the point P on an elliptic curve.
P *:= n : PtEll, RngIntElt ->
Set P equal to the n-th multiple of itself.

Example CrvEll_PointArithmetic (H85E10)

We construct some points in a certain elliptic curve over Q and try by hand to find a "smaller" set of points that generate the same group.

> E := EllipticCurve([0, 0, 1, -7, 6]);
> P1 := E![ 175912024457 * 278846, -41450244419357361, 278846^3 ];
> P1;
(175912024457/77755091716 : -41450244419357361/21681696304639736 : 1)
> P2 := E![ -151 * 8, -1845, 8^3 ];
> P2;
(-151/64 : -1845/512 : 1)
> P3 := E![ 36773 * 41, -7036512, 41^3 ];
> P3;
(36773/1681 : -7036512/68921 : 1)
Now we try small linear combinations in the hopes of finding nicer looking points. We shall omit the bad guesses and just show the good ones.

> P1 + P2;
(777/3364 : 322977/195112 : 1)
Success! We replace P1 with this new point and keep going.

> P1 +:= P2;
> P2 + P3;
(-3 : 0 : 1)
> P2 +:= P3;
> P3 - P1;
(-1 : -4 : 1)
> P3 -:= P1;
After a small search we find:

> P1 -:= 2*P2;
> [ P1, P2, P3 ];
[ (0 : 2 : 1), (-3 : 0 : 1), (-1 : -4 : 1) ]
The only other candidate for a smaller point is something with x-coordinate 2, but while this point exists it is generated by smaller points and so does not improve matters.

> IsPoint(E, 2);
true (2 : 0 : 1)
> P3 - P1;
(2 : 0 : 1)
These points are in fact the generators of the Mordell--Weil group of this particular elliptic curve. Since none of the transformations increased the size of the space spanned by the points it follows that the original set of points are also generators of E. The reduced points form a much more convenient basis, however.

Example CrvEll_GenericPoint (H85E11)

We construct an elliptic curve over a function field (hence an elliptic surface) and form a "generic" point on it. First, we construct the function field.

> E := EllipticCurve([GF(97) | 1, 2]);
> K<y> := FunctionField(E);
> F<x> := BaseRing(K);
Now we lift the curve to be over its own function field, and form a generic point on E.

> EK := BaseChange(E, K);
> P := EK![x,y,1];
> P;
(x : y : 1)
> 2*P;
((73*x^4 + 48*x^2 + 93*x + 73)/(x^3 + x + 2) :     (85*x^6 + 37*x^4 + 5*x^3 + 60*x^2 + 96*x + 8)/
    (x^6 + 2*x^4 + 4*x^3 + x^2 + 4*x + 4)*y : 1)
Finally, we verify, by a cut-and-paste, that addition of the generic point serves as definition of the addition laws on the curve.

> Q<x,y> := PolynomialRing(E);
> m2 := Isogeny(E, E, x^3 + x + 2, 73*x^4 + 48*x^2 + 93*x + 73,
>          (85*x^6 + 37*x^4 + 5*x^3 + 60*x^2 + 96*x + 8)*y);
> P := E![32,93,1];
> m2(P);
(95 : 63 : 1)
> 2*P;
(95 : 63 : 1)

Point Order

Order(P) : PtEll -> RngIntElt
Given a point on an elliptic curve defined over Q or a finite field, this function computes the order of P; that is, the smallest positive integer n such that n⋅P=O on the curve. If no such positive n exists, then 0 is returned to indicate infinite order. If the curve is defined over a finite field, the order of the curve will first be computed.
FactoredOrder(P) : PtEll -> RngIntElt
Given a point on an elliptic curve defined over Q or over a finite field, this function returns the factorization of the order of P. If the curve is over a finite field then on repeated applications this is generally much faster than factorizing Order(P) because the factorization of the order of the curve will be computed and stored. An error ensues if the curve is defined over Q and P has infinite order.

Example CrvEll_PlayWithPoints (H85E12)

We show a few simple operations with points on an elliptic curve over a large finite field.

> E := EllipticCurve([GF(NextPrime(10^12)) | 1, 1]);
> Order(E);
1000001795702
> FactoredOrder(E);
[ <2, 1>, <7, 1>, <13, 1>, <19, 1>, <31, 1>, <43, 1>, <59, 1>, <3677, 1> ]
> P := E ! [652834414164, 320964687531, 1];
> P;
(652834414164 : 320964687531 : 1)
> IsOrder(P, Order(E));
true
> FactoredOrder(P);
[ <2, 1>, <7, 1>, <13, 1>, <19, 1>, <31, 1>, <43, 1>, <59, 1>, <3677, 1> ]
> FactoredOrder(3677 * 59 * P);
[ <2, 1>, <7, 1>, <13, 1>, <19, 1>, <31, 1>, <43, 1> ]

Predicates on Points

IsId(P) : PtEll -> BoolElt
IsIdentity(P) : PtEll -> BoolElt
IsZero(P) : PtEll -> BoolElt
Returns true if and only if the point P is the identity point of its point set, false otherwise.
P eq Q : PtEll, PtEll -> BoolElt
Returns true if and only if P and Q are points on the same elliptic curve and have the same normalized coordinates.
P ne Q : PtEll, PtEll -> BoolElt
The logical negation of eq.
P in H : PtEll, SetPtEll -> BoolElt
Given a point P, return true if and only if P is in the point set H. That is, it satisfies the equation of E and its coordinates lie in R, where H = E(R).
P in E : PtEll, CrvEll -> BoolElt
Given a point P, return true if and only if P is on the elliptic curve E (i.e., satisfies its defining equation). Note that this is an exception to the general rule, in that P does not have to lie in the base point set of E for this to be true.
IsOrder(P, m) : PtEll, RngIntElt -> BoolElt
Returns true if and only if P has order m. If you believe that you know the order of the point then this intrinsic is likely to be much faster than just calling Order.
IsIntegral(P) : PtEll -> BoolElt
Given a point P on an elliptic curve defined over Q, this function returns true if and only if the coordinates of the (normalization of) P are integers.
IsSIntegral(P, S) : PtEll, SeqEnum -> BoolElt
Given a point P on an elliptic curve defined over Q and a sequence S of primes, this function returns true if and only if the coordinates of the (normalization of) P are S-integers. That is, the denominators of x(P) and y(P) are only supported by primes of S.

Weil Pairing

Magma contains an optimized implementation of the Weil pairing on an elliptic curve. This function is used in the computation of the group structure of elliptic curves over finite fields, making the determination of the group structure efficient.

WeilPairing(P, Q, n) : PtEll, PtEll, RngIntElt -> RngElt
Computes the Weil pairing of P and Q, both of which must be n-torsion points.
IsLinearlyIndependent(S, n) : [ PtEll ], RngIntElt -> BoolElt
Returns true if and only if the sequence S is linearly independent over Z/nZ. The points in S must have order dividing n.
IsLinearlyIndependent(P, Q, n) : PtEll, PtEll, RngIntElt -> BoolElt
Returns true if and only if the points P and Q form a basis of the n-torsion points.

Example CrvEll_WeilPairing (H85E13)

The following example demonstrates the Menezes, Okamoto, and Vanstone (MOV) reduction of the discrete logarithm on a supersingular elliptic curve to a discrete logarithm in a finite field. The group structure of a supersingular curve E over a finite prime field F_p for p > 3 can be Z/nZ or Z/2Z x Z/(n/2)Z, where n = p + 1, and the group structure over a degree 2 extension is Z/nZ x Z/nZ. The nontrivial Weil pairing on this is the basis for this reduction.

> p := NextPrime(2^131);
> n := p + 1;
> n;
2722258935367507707706996859454145691688
> Factorization(n);
[ <2, 3>, <3, 2>, <37809151880104273718152734159085356829, 1> ]
> E0 := SupersingularEllipticCurve(GF(p));
> G<x>, f := AbelianGroup(E0);
> G;
Abelian Group isomorphic to Z/2722258935367507707706996859454145691688
Defined on 1 generator
Relations:
    2722258935367507707706996859454145691688*x = 0
> n eq #G;
true
> P0 := f(x);
> E1 := BaseExtend(E0,GF(p^2));
> P1 := E1!P0;
> repeat
>    Q1 := Random(E1);
>    z1 := WeilPairing(P1,Q1,n);
> until Order(z1) eq n;
> IsOrder(Q1, n);
true
> r := 1234567;
> z2 := WeilPairing(r*P1,Q1,n);
> z1^r eq z2;
true
> WeilPairing(P1,r*P1,n);
1

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]