Chapter II · elliptic-curve points
Elliptic-curve points and addition
We can build an elliptic-curve public key by repeatedly adding points on a finite-field curve.
Finite-field curves contain discrete points
If you draw an elliptic curve over real numbers, you see a smooth line. Over a finite field, you get a finite set of coordinate pairs that satisfy the same equation.
The coordinates are field elements, not ordinary whole numbers. We display them as integers from 0 through 16 because those are convenient representatives of the elements modulo 17.
Let's test G = (5, 1). It is on the curve because both sides of the equation reduce to 1 modulo 17.
Left side: 1² ≡ 1 (mod 17)
Right side: 5³ + 2·5 + 2 = 137
Reduce: 137 ≡ 1 (mod 17)
A coordinate pair either satisfies the curve equation or it does not. This is the basis of Solana's on-curve and off-curve distinction.
How elliptic-curve point addition works
When we write P + Q, we do not mean (x₁ + x₂, y₁ + y₂). We apply the curve's point-addition rule instead.
The valid points and a special identity point 𝒪 form a group:
Calculate 2G step by step
To compute G + G, first calculate a slope λ. Every operation wraps modulo 17, including division. Dividing by 2 means multiplying by the modular inverse of 2, which is 9.
λ = (3x² + a) / 2y
λ = (3·5² + 2) / (2·1) = 77 / 2
λ ≡ 9 · 9 ≡ 13 (mod 17)
x₃ = λ² − 2x ≡ 13² − 10 ≡ 6
y₃ = λ(x − x₃) − y ≡ 13(5 − 6) − 1 ≡ 3
Quick check 1
On our toy curve, which point equals 2G?
Scalar multiplication as repeated addition
Move the scalar k and watch the highlighted point change. That point is kG, which means we added G to itself k times. It does not mean multiplying the coordinates of G by k.
At 19G, you reach 𝒪, the identity point. Another step would return to G. Our toy subgroup therefore has order 19.
Private scalars and public points
You can model an elliptic-curve private key as a secret scalar k. Its public key is the point Q = kG. Ed25519 adds hashing, clamping, encoding, and subgroup rules, but Q=kG is the core relationship.
Solana transaction signers use Ed25519 keys. PDAs are off-curve and have no matching secret scalar. Programs authorize PDAs through runtime-checked derivation.
Quick check 2
Which operation captures the private-to-public direction?
Check your understanding
Try to answer each question before you open the solutions.
- Why does an elliptic curve over a finite field look like dots?
- Why is point addition not coordinate-wise addition?
- What does kG mean?
- Why can a public key be shared while its private scalar must stay secret?
- Why does off-curve imply that a Solana PDA has no Ed25519 private key?
Show numbered solutions
-
The field has finitely many x-values and y-values. Testing each pair against the curve equation leaves a finite set of points rather than a continuous line.
-
Point addition draws a line through two points, finds the third curve intersection, and reflects it. The algebra reproduces this construction over a finite field. Coordinate-wise addition does not generally stay on the curve.
-
kG means adding G to itself k times with the curve's addition law. The scalar k is a number; G and kG are points. This is not ordinary coordinate multiplication.
-
Computing Q=kG from k is efficient. Recovering k from G and Q is infeasible with current classical methods and production parameters. Anyone who learns k can sign as its owner.
-
A PDA does not decode as an Ed25519 curve point. No scalar k can produce it as Q=kG, so it has no matching private key. The runtime checks PDA seeds instead.
Primary reading
- RFC 8032, sections 3 and 5.1 specifies EdDSA parameters, modular arithmetic, point addition, keys, signing, and verification.
- SEC 1, sections 2.2 and 2.3 defines elliptic curves over finite fields and the group operation.
- Solana's PDA documentation ties off-curve addresses to the absence of private keys.