Part 2: Elliptic curve over finite fields

In a previous post in our series on elliptic curves (Part 1: What Are Elliptic Curves) we introduced elliptic curves and showed what they look like in the Cartesian plane when defined over the real numbers. Its is mandatory to have read the Part 1 of the series to understand this one. As explained, there are multiple algebraic equations that can define an elliptic curve. In this article, we will focus on the reduced Weierstrass equation when discussing elliptic curves.

Why integers and not real numbers ?

In modern cryptography, we prefer working with integers, mainly because they can easily represent real-world data such as text, and because they include prime numbers, which are the foundation of many hard mathematical problems essential to ensuring computational security. Furthermore, integers are straightforward to represent in computers using bits unlike real numbers, which are more complex to handle in digital systems.

In this article, we will explain how elliptic curves can be defined over finite fields of integers, and what operations can be performed on them.

From real numbers to integers fields

When we speak of elliptic curves over the real numbers, we mean that the coordinates of each point (x,y) on the curve are real-valued. To work in the integer setting, we restrict these coordinates to a finite set of integers, namely, those in a finite field.

Finite fields Fp=Z/pZF_p = Z/pZ

We define Fp=Z/pZF_p = Z/pZ where :

  • ZZ is the set of all integers

  • pp a prime number

  • Fp=Z/pZF_p = Z/pZ is the set of integers modulo pp, i.e., 0,1,2,…,p−1{0,1,2,…,p−1}

This set of numbers have some properties listed below:

  • Fp=Z/pZF_p = Z/pZ contains exactly p elements.

  • Every non-zero element has a multiplicative inverse in Fp=Z/pZF_p = Z/pZ. In other words, for every a∈Fp=Z/pZ,a≠0a \in F_p = Z/pZ, a \neq 0, there exists an element a−1∈Fpa^{-1} \in F_p such that a.a−1≡1  mod  pa.a^{-1} \equiv 1 \; \text{mod}\; p.

  • Arithmetic operations — addition, subtraction, multiplication, and division — are all performed modulo p.For example if l=x+yl = x+y, this actually means:

l=x+y  mod  pl = x+y\; \text{mod}\; p

In practice, we often omit the mod  p\text{mod}\; p notation, but it's always understood to be applied.

  • Fp=Z/pZF_p = Z/pZ is a field, meaning it satisfies all the properties of a mathematical field: it has no zero-divisors, and every non-zero element has an inverse. This ensures that all basic arithmetic operations are well-defined and can be reversed (except for division by zero, which is never allowed).

Elliptic curves over Fp=Z/pZF_p = Z/pZ

It is quite straightforward to adapt elliptic curves to the setting of finite fields, specifically Fp=Z/pZF_p = Z/pZ. Here's how we proceed:

  1. Define the finite field Fp=Z/pZF_p = Z/pZ, where pp is a prime number.

  2. Take the coefficients a,b∈Fpa, b \in F_p and use the reduced Weierstrass :

y2=x3+ax+b  (mod  p)y^2 = x^3 + ax + b \; (\text{mod} \; p)

Ensure that the discriminant Δ=4a3+27b2≠0  (mod  p)\Delta = 4a^3 + 27b^2 ≠ 0 \; (\text{mod} \; p).

  1. Consider the set of all pairs (x,y)∈Fp×Fp(x, y) ∈ F_p × F_p that satisfy this equation.

We can now state the formal definition:

Let Fp=Z/pZF_p = Z/pZ with p≥5p ≥ 5 a prime number. An elliptic curve EE over FpF_p is defined by the equation:

y2≡x3+ax+b  (mod  p)y^2 \equiv x^3 + ax + b \; (\text{mod} \; p)

where a,b∈Fpa, b ∈ F_p, and Δ≠0  (mod p)\Delta \neq 0\; (\text{mod p}) This ensures that the curve is non-singular.

The set of all solutions is completed by adding a special point called the point at infinity, usually denoted by OO, which acts as the identity element in the group of points on the curve.

The image below show how different curve representations are depending on the field.

On the left the curve y2=x3−3x+1y^2 = x^3 -3x +1 plotted over real numbers and on the right the same curve, but with points restricted to the finite field Fp.F_p.

Final thougths

As you've seen, moving from the real numbers to finite fields changes the visual and mathematical nature of elliptic curves. We go from smooth, continuous curves to sets of discrete points scattered in a bounded space. The number of points on such a curve is finite. In fact, it's always less than or equal to p2+1p^2+1.

The key idea is that we can define a group structure over the set of points on an elliptic curve defined over FpF_p​. This group supports:

  • Addition of points,

  • Scalar multiplication (repeated addition),

  • And the ability to find inverses (with respect to the group operation).

These operations form the basis of elliptic curve cryptography. In the next part of this series, we'll explore exactly how these operations work and how they lead to hard problems that form the backbone of ECC, such as the Elliptic Curve Discrete Logarithm Problem (ECDLP).

Last updated