Several fundamental operations on elliptic curves over finite fields are provided as built-in functions.

An elliptic curve is specified by a vector `[a b]` of length 2,
where `a`, `b` are elements of finite fields.
If the current base field is a prime field, then `[a b]` represents
`y^2=x^3+ax+b`. If the current base field is a finite field of
characteristic 2, then `[a b]` represents `y^2+xy=x^3+ax^2+b`.

Points on an elliptic curve together with the point at infinity
forms an additive group. The addition, the subtraction and the
additive inverse operation are provided as `ecm_add_ff()`

,
`ecm_sub_ff()`

and `ecm_chsgn_ff()`

respectively.
Here the representation of points are as follows.

- 0 denotes the point at infinity.
- The other points are represented by vectors
`[x y z]`of length 3 with non-zero`z`.

`[x y z]` represents a projective coordinate and
it corresponds to `[x/z y/z]` in the affine coordinate.
To apply the above operations to a point `[x y]`,
`[x y 1]` should be used instead as an argument.
The result of an operation is also represented by the projective
coordinate. As the third coordinate is not always equal to 1,
one has to divide the first and the scond coordinate by the third
one to obtain the affine coordinate.

Go to the first, previous, next, last section, table of contents.