Elliptic Curves Over Finite Fields
The previous article established arithmetic in . We now use that arithmetic to construct the points of one elliptic curve over the field, then add those points directly.
Throughout this article, the running example is
Before building it step by step, take a look at what the so called point cloud looks like:
You don't need to understand it right now. This is the final result that we are aiming to achieve throughout this article. This animation is merely to build some intuition of what the final result should be - a point cloud.
Some preliminary things you may have already noticed:
- The axes list the field representatives through .
- Some values have no corresponding value, most valid values have two values related by , and the point has only one corresponding .
The choice keeps the field small enough to visualize while still defining a nonsingular elliptic curve. By the end of this article, we will reconstruct its 13 plotted affine points, add the point at infinity, and use the complete 14-element group for point addition.
Note
Recall that means arithmetic modulo . Its elements are the representatives through , and every operation is reduced modulo .
Next, we go step by step from the elliptic curve equation we have been seing so far, until we end up with the exact same result as above.
1. Start with an Elliptic Curve Over the Real Numbers
Consider the equation
Over the real numbers, where and may take any real value. For each chosen , we first compute the right side:
Whenever this value is non-negative, the corresponding real -coordinates are
This produces two branches that are symmetric about the horizontal axis:
The result is the familiar smooth elliptic-curve shape.
The curve is continuous because the underlying coordinate system is . Between any two real coordinate values, infinitely many other real values exist.
2. Replace the Infinite Coordinate Plane with a Finite Coordinate Set
Since we are primarily interested in elliptic curves over a finite field, we will want to convert the real number curve into a finite set of points.
So we first restrict the inputs and to not come from real numbers, but from natural numbers over some modulo - giving us a finite field:
containing the values
For the running example,
the possible coordinate representatives are
So both and must now come from this finite set. Visually, we can introduce a finite coordinate grid:
The real curve may remain visible in the background as a reference, but the square should not be interpreted as a literal crop of the real curve.
The finite-field curve is not the part of the real curve that happens to lie inside this square. The square only represents the available coordinate values in .
3. Restrict the Input to Field Elements
Over the real numbers, can vary continuously.
Over , there are only eleven possible values:
Define the right-hand-side polynomial
We now evaluate once for every possible field element .
For example:
At this stage, these are still ordinary integer results. Some lie inside the range to , while others are much larger.
The important transition is that the continuous input axis has become a finite collection of discrete columns.
4. Reduce the Right-Hand Side Modulo
The coordinates and arithmetic now belong to , so every polynomial result must be reduced modulo .
Define
For the previous values:
Modulo reduction replaces every integer with its representative in
A useful visual model is to move each temporary polynomial value vertically by a multiple of until it enters the finite coordinate window.
The resulting markers are the points
These markers show the modular value of the right-hand side for every possible .
They are not yet the elliptic-curve points.
This is the only part that resembles “wrapping.” We are wrapping discrete polynomial outputs modulo , not wrapping the continuous real curve itself.
5. Compute the Possible Values of
The left-hand side of the elliptic-curve equation is
We must therefore evaluate
for every possible value
The first few results are:
The values mirror after :
These repeated values are why one right-hand-side residue can produce two valid -coordinates.
This happens because
In modular arithmetic,
so and produce the same square.
The values that can be written as are called quadratic residues modulo .
Not every field element is a quadratic residue. Therefore, not every right-hand-side value can correspond to a valid elliptic-curve point.
6. Match the Left-Hand Side with the Right-Hand Side
A coordinate pair belongs to the finite-field curve exactly when
Using the helper functions introduced above, this condition is
Consider .
The right-hand side is
We now search for values of satisfying
There are two solutions:
and
Therefore, the finite-field curve contains the two points
For another , the right-hand-side residue may have:
- two corresponding -values;
- one corresponding -value in the special case ;
- no corresponding -value when the residue is not a quadratic residue.
Right-hand-side residue
Non-zero quadratic residue
Two curve points, and
One curve point,
Non-residue
No curve point for this
7. Repeat the Matching Process for Every
The construction is now repeated for every possible value
For each :
-
Compute
-
Find every such that
-
Add the corresponding coordinate pairs .
Equivalently, the complete finite-field curve is
Here, is the point at infinity used as the identity element for elliptic-curve point addition. It is part of the mathematical group, but it does not appear as an ordinary point in the two-dimensional coordinate grid.
The plot contains ordinary, or affine, points. The full elliptic-curve group also includes , so
8. The Final Finite-Field Elliptic Curve
After all matches have been collected, the continuous real curve has disappeared. What remains is a finite set of isolated points.
This point cloud is the affine part of the elliptic curve over — the same 13-point cloud shown in the preview at the start of the article. Adding gives the complete 14-element group used for point addition.
It looks unrelated to the smooth real curve because the underlying coordinate system and arithmetic have changed:
| Real-number curve | Finite-field curve |
|---|---|
| Coordinates belong to | Coordinates belong to |
| Infinitely many possible coordinates | Exactly possible values per axis |
| Ordinary arithmetic | Arithmetic modulo |
| Smooth and continuous | Finite and discrete |
| Visual geometric curve | Algebraically defined point set |
The defining equation is structurally the same:
What changes is the number system in which the equation is interpreted.
9. Why the Points Appear in Symmetric Pairs
Suppose satisfies the curve equation:
Because
the point
also satisfies the equation.
Inside , the additive inverse of is represented by
Therefore, finite-field points usually occur in pairs:
For example, with ,
Thus is the modular additive inverse of , and the points
form a symmetric pair.
The visual symmetry lies around the middle of the coordinate range, but its mathematical cause is modular additive inversion—not ordinary reflection geometry.
10. What Modulo Does—and Does Not Do
It is useful to distinguish three different ideas.
10.1. Modulo does
- restrict coordinates to the representatives ;
- reduce polynomial results into that range;
- define addition, subtraction, multiplication, and division inside ;
- determine which coordinate pairs satisfy the elliptic-curve equation.
10.2. Modulo does not
- crop the real elliptic curve;
- round real-valued curve points to integers;
- sample points directly from the real curve;
- fold the entire continuous curve into a square.
The real and finite-field plots are two visualizations of the same algebraic equation interpreted over different number systems.
The real curve provides useful geometric intuition, but the finite-field point set must be computed directly using modular arithmetic.
11. Point Addition Over a Finite Field
The chord-and-tangent picture from the real-number curve is useful intuition, but it is not a literal construction over . There is no continuous curve or ordinary straight line to draw through the finite point cloud.
Instead, the same group law is defined algebraically with finite-field arithmetic. For a short Weierstrass curve over a prime field with , let
When and , calculate the slope using a modular inverse:
Then the sum is , where
If and have the same -coordinate but are different points, then and:
For point doubling, when and , use:
followed by the same formulas for and . If , then , so:
Important
Division in these formulas means multiplication by a modular inverse. The denominator must be non-zero; the exceptional cases above handle the times when it is zero.
Example: Doubling a point in E(\mathbb{F}_{11})
On the running curve, and . Because :
Therefore:
So . Adding to with the distinct-point formula gives .
These formulas produce the same abstract group operation introduced earlier. Together with , the points of a nonsingular finite-field curve form an abelian group, even though the real-number geometric construction is no longer literal.
12. Nonsingular Curves
Choosing a prime modulus does not mean that every curve is automatically suitable. The curve must also be nonsingular.
For a short Weierstrass curve
over a field of characteristic greater than , the nonsingularity condition is
For the running example,
we obtain
which is nonzero. Therefore, the curve is nonsingular over .
13. Complete Construction Algorithm
The full point set can be computed directly with the following procedure:
points = []
for x in 0 .. p-1:
rhs = (x^3 + a*x + b) mod p
for y in 0 .. p-1:
lhs = y^2 mod p
if lhs == rhs:
points.append((x, y))14. From This Toy Cloud to Production Curves
Our running example uses so that every calculation and every point fits on the page. It is useful for learning, but it offers no security: anyone can enumerate its tiny field, list its curve points, and try every possible scalar.
Production ECC uses exactly the same ideas—evaluate an elliptic-curve equation over a finite field and add its points with finite-field arithmetic—but with a published parameter set and a much larger prime. The remaining public parameters that turn the group into a key system are introduced in the next article.
For example, the real-number graph of
is a smooth curve. The production curve secp256k1 uses that same polynomial over the finite field
so its defining equation is
The construction is the same as our point cloud, but the scale is completely different.
| Production curve | Field size | Equation form | Notes |
|---|---|---|---|
| secp256k1 | A short-Weierstrass curve, like the form used in this article. | ||
| P-256 / secp256r1 | a 256-bit prime field | Another standardized short-Weierstrass parameter set. | |
| Curve25519 | Uses the Montgomery form rather than the short-Weierstrass form. |
With , the coordinate grid has only
possible coordinate pairs, and our curve has only ordinary points. For a roughly 256-bit production field, the coordinate grid has about possible locations and the curve has on the order of points. A literal point-by-point plot would therefore look like a dense square or noise, not like the sparse cloud above.
The graph below draws a tiny, genuine sample of secp256k1 points. The coordinates are scaled down for display; it is not the complete point cloud.
The large modulus is not only about making the picture bigger. Together with a carefully selected curve and a large prime-order subgroup, it makes recovering a secret scalar from a public point computationally infeasible. A 256-bit field is commonly chosen to target roughly 128 bits of classical security.
A large prime alone is not enough. Real systems use vetted, standardized curve parameters and must validate points and handle scalar arithmetic correctly.
15. Summary
The path from the real elliptic curve to the finite-field point cloud is:
Continuous real curve
Finite coordinate set
Discrete inputs
RHS modulo
Quadratic residues
Matching residues
Finite point cloud
The cloud is not a distorted image of the real curve.
It is the complete set of coordinate pairs in that satisfy the same algebraic equation under modular arithmetic.