Curves Over Finite Fields
Goal
By the end of this chapter, you should understand what it means to define an elliptic curve over , how points are counted in small examples, why group size matters, and why cryptographic protocols usually work in carefully chosen prime-order subgroups.
You should also have a first conceptual understanding of torsion points, cofactors, cofactor clearing, subgroup checks, and invalid-curve attacks.
Prerequisites
You should know:
- finite fields, especially
- elliptic curve point addition
- scalar multiplication
- group order and element order
Motivation
Over the real numbers, elliptic curves make smooth pictures. Over finite fields, they become finite sets of points. That finiteness is exactly what cryptography needs: a large but bounded group where computation is exact.
The shift from real numbers to finite fields changes how we think. There is no continuous curve to draw. There are only points whose coordinates satisfy the equation modulo .
Curves Over
Let be prime. A short Weierstrass elliptic curve over has an equation:
where and:
in .
The points are:
The notation means "the points of whose coordinates are in , plus the point at infinity."
Counting Points: A Tiny Example
Consider:
over .
First list the square values modulo :
So the possible values of are:
Now evaluate the right side for each :
| matching values | ||
|---|---|---|
| 0 | 3 | none |
| 1 | 1 | 1, 4 |
| 2 | 0 | 0 |
| 3 | 1 | 1, 4 |
| 4 | 0 | 0 |
So the affine points are:
Then add the point at infinity . Therefore:
This curve has seven points over .
Hasse Bound, Lightly
For a curve over , the number of points is close to . Hasse's bound says:
For , this gives:
Our example has points, which fits the bound.
The bound is useful because it says the number of points is not arbitrary. It is tightly constrained by the field size.
Group Structure
The set forms a finite abelian group under elliptic curve point addition.
Because it is finite, every point has finite order. If is a point, then some positive integer satisfies:
The order of a point divides the order of the group. This is one reason group size matters in cryptography.
Torsion Points
A torsion point is a point with finite order. Over finite fields, every point is a torsion point because the whole group is finite.
The phrase is still useful because we often talk about points killed by a specific scalar. For example, a point is an -torsion point if:
In cryptography, we often care about a large prime and the subgroup of points whose order divides .
Scalar Multiplication
Scalar multiplication is repeated point addition:
In finite elliptic curve groups, scalar multiplication eventually cycles back to .
Example: in the tiny curve from above, the group has points. Since is prime, every non-identity point has order . For any non-identity point :
Real cryptographic groups use enormous prime-order subgroups, not tiny groups like this.
Prime-Order Subgroups
A prime-order subgroup is a subgroup whose number of elements is a prime .
Prime-order subgroups are useful because their non-identity elements all have order . This avoids many small-subgroup problems and makes the group structure simpler for cryptographic protocols.
If a curve group has order:
where is a large prime, then is called the cofactor.
Cofactors
The cofactor is the ratio between the full curve group size and the desired large prime subgroup size:
If , the whole curve group has prime order.
If , the curve has points outside the desired prime-order subgroup. Protocols must handle those points carefully.
Cofactor Clearing
Cofactor clearing maps a point into a desired subgroup by multiplying by a cofactor or by a related subgroup-clearing factor.
The simplest idea is:
This can remove components of the point that live outside the large prime-order subgroup.
Real protocols may use optimized or curve-specific cofactor-clearing methods. The important concept is that not every point with valid coordinates is automatically in the subgroup a protocol wants.
Subgroup Checks
A subgroup check verifies that a point belongs to the intended subgroup.
For a prime-order subgroup of order , a direct check is:
If this holds and is valid, then is in the subgroup whose order divides .
Subgroup checks matter when accepting public keys, signatures, or other points from outside the program. A point can satisfy the curve equation but still be in the wrong subgroup.
Invalid-Curve Attacks, Conceptually
An invalid-curve attack happens when an implementation performs scalar multiplication on points that are not valid points of the intended curve or not in the intended subgroup.
The attacker may craft inputs that live in a smaller or different group. If the implementation multiplies secret scalars by those points and reveals enough information, the attacker may learn something about the secret.
The core lesson is simple: validate external points before using them in security-sensitive group operations.
This chapter gives the concept, not a full attack implementation.
Chia Connection
BLS12-381 has elliptic-curve groups commonly called G1 and G2. These are subgroups associated with curves over finite fields and extension fields.
For BLS signatures, it is not enough for a byte string to decode to coordinates that satisfy a curve equation. Implementations also need the point to be in the right subgroup and represented canonically according to the relevant specification.
Later chapters will discuss BLS12-381, G1, G2, cofactors, subgroup checks, and serialization at a higher level. Chia-specific behavior should be checked against Chia source code and BLS standards when we make detailed claims.
Common Pitfalls
Thinking every coordinate pair is a point. A pair is a point only if it satisfies the curve equation.
Forgetting the point at infinity. It counts as part of the group.
Confusing the whole curve group with a protocol subgroup. Protocols often use a large prime-order subgroup, not every curve point.
Ignoring cofactors. When , some valid curve points may be outside the desired subgroup.
Assuming cofactor clearing and subgroup checks are interchangeable in every protocol. They are related but serve different roles, and real specifications must be followed.
Skipping point validation. Invalid points can break assumptions behind scalar multiplication and verification.
Exercises
- Over , list the square values for .
- Over , recount the points on and confirm that there are seven including .
- State Hasse's bound for .
- If a curve group has order and the desired prime subgroup has order , what is the cofactor?
- Explain why a point can satisfy the curve equation but still be unsuitable for a protocol.
- What does the subgroup check test?
- In your own words, explain why prime-order subgroups are convenient in cryptography.
- Give one reason an implementation should validate points received from the network.
Further Reading
- Later chapter: Pairings
- Later chapter: BLS12-381
- Later chapter: BLS Signatures
- Any elliptic curve cryptography reference covering cofactors and subgroup checks