CRYPTOGRAPHY

ECC: How Do Points on a Curve Become Keys?

Follow ECC from its 1985 origin through elliptic curves, point addition, Galois fields, scalar multiplication, and the simple idea that a private key is a number while a public key is a point.

14 min read

Start with a path across a strange map

ECC hides a secret number in a journey between curve points. The forward trip Q = kG is efficient; reconstructing k from public G and Q is the difficult direction.

The twelve plates build that picture without jumping into a protocol: first the 1985 origin, then the curve, point addition, the point at infinity, Galois fields, the toy group over GF(17), scalar multiplication, and finally a key pair.

The toy group over GF(17) is small enough to check by hand and completely insecure. In the experiment below, compute 2G=(6,3) and 19G=𝒪 with the same point-addition rules. Follow the geometry first, then the finite-field arithmetic, before using a private scalar d and public point Q in a real protocol.

ECC Comic Classroom page 1: the RSA factoring path is contrasted with the elliptic-curve discrete-log path and smaller key sizes
ECC is not a smaller RSA; it builds public-key asymmetry from a different hard problem.

Why look for another public-key path?

Start in 1985

By 1985, public-key cryptography and RSA already existed. Cryptographers were still looking for other one-way roads: operations that are quick in the forward direction but impractical to reverse from the public result.

Victor Miller and Neal Koblitz independently proposed building cryptosystems from groups of points on elliptic curves. RSA uses the difficulty of recovering prime factors from a large product. ECC uses the difficulty of recovering the secret scalar k from a public starting point G and public point Q = kG. Their arithmetic and attack methods need separate analysis. [1][2]

What smaller keys really mean

In NIST's conventional security-strength comparison, roughly 128 bits of security correspond to a 3072-bit RSA-style modulus or an elliptic-curve key in the 256–383-bit range. These are parameter sizes for comparable strength under the stated attack model. Actual speed and cost still depend on the curve, implementation and protocol. [4]

Smaller parameters can matter in smart cards, mobile devices, networks, and embedded systems. They do not make every ECC design automatically faster or safer. Curve choice, implementation, protocol, and threat model still decide the real result.

Build the math before the protocol

Before discussing any protocol, we need to understand the mathematical stage. The first surprise is in the name: an elliptic curve is not an ellipse.

Page 2: an ellipse is compared with the cubic equation and nonsingularity condition of an elliptic curve
The historical name does not describe the curve's shape.

An elliptic curve is not an ellipse

Ignore the oval

The word elliptic invites the wrong sketch. An elliptic curve is commonly written y² = x³ + ax + b. Because the right side contains x³, its graph may look like two bending paths or take another cubic shape; it is not the familiar oval from geometry class.

The name comes from mathematical history. Work on ellipse arc lengths led to elliptic integrals, and those integrals later became deeply connected with this family of cubic curves. The historical name stayed even though the picture is not an ellipse.

Keep the curve nonsingular

Not every choice of a and b is acceptable. We require the curve to be nonsingular—no cusp and no self-intersection. For this short Weierstrass form, the condition is 4a³ + 27b² ≠ 0. If it fails, the tangent or addition rule breaks at troublesome points.

Our teaching curve is y² = x³ + 2x + 2. We first view it over the real numbers so the geometry is visible. Later we move the same equation into GF(17), where the continuous drawing turns into a finite set of points.

Page 3: coordinate substitution, vertical symmetry, and the point at infinity identify the curve group's members
The special point 𝒪 plays the role of zero in point addition.

Which points belong to the curve?

Test a coordinate

A point P = (x, y) belongs to the curve only when its coordinates satisfy the equation. Substitute x and y, calculate both sides, and compare. A dot that merely looks close to the line is not a member.

Because the left side is y², changing y to −y leaves the square unchanged. When (x, y) lies on the curve, its reflected point (x, −y) normally lies there too. That vertical symmetry will soon become the rule for a negative point.

Give the group a zero

We also add one special member called the point at infinity, written 𝒪. It behaves like zero: P + 𝒪 = P. A point and its reflection add to 𝒪, so P + (−P) = 𝒪.

The extra point may feel invented, but it closes the arithmetic cleanly. Ordinary addition needs zero; elliptic-curve point addition needs its own identity element. After a complete trip around our small group, 𝒪 is exactly where we return.

Page 4: a chord through P and Q meets a third point which is reflected to define P plus Q
Chord, third intersection, and reflection turn geometry into an addition rule.

Draw a line, find the third point, then reflect

Follow the geometry

Choose two different curve points P and Q. Draw the line through them. A nonsingular cubic gives one more intersection R′ when intersections are counted correctly. Reflect R′ across the x-axis and call the result R. By definition, P + Q = R.

Why include the reflection? It makes the rule work neatly with negative points and the identity 𝒪. The picture is more than decoration: it is a memory aid for the algebraic operation.

Translate the picture into algebra

Over the real numbers, calculate the chord slope λ = (y_Q − y_P)/(x_Q − x_P). Then x_R = λ² − x_P − x_Q and y_R = λ(x_P − x_R) − y_P. Each piece corresponds to something visible in the diagram: line, third intersection, and reflection.

We are still in the real-number world. Once the picture is familiar, the same formulas can be reinterpreted inside a finite field, where division means multiplying by an inverse rather than producing a floating-point number.

Page 5: closure, identity, inverse, and associativity explain why curve points form a group
The group laws make repeated point addition well defined.

Point addition gives us a dependable group

Check the four group promises

A cryptographic operation must compose reliably, not merely produce an attractive result once. Curve-point addition is closed: adding two group members gives another group member. The point 𝒪 is an identity, and every P has an inverse −P that returns it to 𝒪.

Addition is associative, so (P + Q) + R = P + (Q + R). We can write P + Q + R without worrying about which pair is evaluated first. Elliptic-curve point addition is also commutative, producing an Abelian group.

A group is the stage, not the security claim

A group is not automatically secure. It supplies the stage on which one operation can be repeated. Security also depends on the group size, the order of the chosen base point, the curve structure, and the best known reverse algorithms.

This is why the group rules come before kG. When we later add G repeatedly, the notation is supported by a well-defined system rather than an unexplained trick.

Page 6: the tangent at P defines point doubling 2P and distinguishes group doubling from coordinate scaling
Two P means P plus P under the curve rule, not twice each coordinate.

When a point meets itself, use the tangent

Let the chord become a tangent

For P + P, two distinct points are no longer available to define a chord. Let Q approach P along the curve. In the limit, the chord becomes the tangent at P. Find the tangency line's third intersection, reflect it, and the result is 2P.

Over the reals, the doubling slope is λ = (3x_P² + a)/(2y_P). The remaining coordinate formulas are the same ones used for ordinary point addition. If y_P = 0, the tangent is vertical and 2P is defined as 𝒪.

Do not double the coordinates

The common mistake is to read 2P as (2x_P, 2y_P). The 2 counts how many copies of P participate in the group operation; it does not enlarge the coordinates.

Continuous real-number geometry has now done its teaching job. Computer ECC needs a finite world where coordinates and arithmetic can be represented exactly, so the next stop is a Galois field.

Page 7: GF(17), modular wraparound, and the multiplicative inverse of five explain finite-field division
A finite field is more than remainders: every nonzero element has an inverse.

A Galois field is finite, yet division still works

Walk around a seventeen-position world

GF(17) contains only 0, 1, 2, …, 16. Values wrap after complete laps, so 15 + 5 = 20 becomes 15 + 5 ≡ 3 (mod 17). This is not rounding; it is division by 17 followed by keeping the remainder.

GF means Galois field, also called a finite field. The word field carries an important promise: addition, subtraction, multiplication, and division by a nonzero element all stay inside the same set.

Replace division with an inverse

Division is the surprising part. In GF(17), seven is the multiplicative inverse of five because 5 × 7 = 35 ≡ 1 (mod 17). Dividing by five therefore means multiplying by seven. No decimal approximation is involved.

Because 17 is prime, every nonzero element has a multiplicative inverse; zero still cannot divide. More general finite fields may contain pⁿ elements, but this lesson stays with the hand-checkable prime field GF(p).

Now the denominators in the point-addition formulas make sense in a finite setting. We replace each division with multiplication by the denominator's modular inverse.

Engineer extension: GF(p) is only one kind of finite field

A finite field has p^m elements for a prime p and positive integer m. Prime fields GF(p) use ordinary integers modulo p. Binary extension fields GF(2^m) represent elements as polynomials over GF(2) modulo an irreducible polynomial. Both support elliptic curves, but their element arithmetic and implementation trade-offs differ.

Page 8: the teaching equation over GF(17) is checked at G equals five comma one and becomes a group of discrete points
The continuous curve becomes finitely many coordinate pairs, while the addition rule survives.

Move the equation into GF(17), and the line becomes dots

Keep only the coordinates that pass

Restrict x and y in y² = x³ + 2x + 2 to the values 0 through 16, and reduce every operation modulo 17. The continuous curve disappears. What remains is a finite collection of coordinate pairs that pass the equation test.

Check G = (5, 1). The left side is 1² = 1. The right side is 5³ + 2 × 5 + 2 = 137, and 137 ≡ 1 (mod 17). The remainders match, so G belongs to the curve.

Trying every x produces eighteen ordinary coordinate points for this teaching curve. Add 𝒪 and the group contains nineteen elements. It is small enough for us to walk around the whole group and inspect every result.

Let geometry remind and arithmetic decide

The chord-and-reflection picture still helps us remember the rule, but it no longer measures a continuous drawing. Slopes use modular inverses, and every new coordinate returns to GF(17). Geometry supplies intuition; finite-field arithmetic supplies the exact answer.

Page 9: scalar multiplication advances from G through multiples and returns to the point at infinity at 19G
kG counts repeated point additions; it does not multiply the coordinates by k.

Scalar multiplication means repeated point addition

Read kG as repeated addition

The notation kG means G + G + ⋯ + G with k copies of G. The ordinary integer k is a scalar and G is a curve point, hence the name scalar multiplication. Under the hood, we are still composing point additions.

Double G by hand

Let us double G = (5, 1). The slope is λ ≡ (3 × 5² + 2) × (2 × 1)⁻¹ (mod 17). Since 2⁻¹ ≡ 9 and 3 × 25 + 2 = 77 ≡ 9, the slope is λ ≡ 9 × 9 ≡ 13. Now x_(2G) ≡ 13² − 5 − 5 ≡ 6 and y_(2G) ≡ 13(5 − 6) − 1 ≡ 3, so 2G = (6, 3).

Take one ordinary addition step: add 2G = (6, 3) to G = (5, 1). The slope is λ ≡ (1 − 3)/(5 − 6) ≡ 2. Then x_(3G) ≡ 2² − 6 − 5 ≡ 10 and y_(3G) ≡ 2(6 − 10) − 3 ≡ 6, giving 3G = (10, 6). Continue to 4G = (3, 1) and 7G = (0, 6). At 19G we return to 𝒪, so G has order nineteen.

Let software use the shortcut

Real software does not add G one at a time when k is large. Double-and-add uses the binary form of k, much like fast exponentiation, so the forward computation remains efficient.

Keep the coordinate trap in view: kG is not (kx_G, ky_G). The curve's group law chooses the route.

Engineer extension: verify the complete toy subgroup

For E: y² = x³ + 2x + 2 over GF(17), G = (5,1) generates a group of order 19. The sequence begins 2G=(6,3), 3G=(10,6), 4G=(3,1), 5G=(9,16), 6G=(16,13), 7G=(0,6), and eventually 18G=(5,16)=-G before 19G=𝒪. The tiny prime order removes cofactor distractions from the main lesson.

Page 10: forward scalar multiplication is compared with recovering k from G and Q
The reverse question is the elliptic-curve discrete-logarithm problem.

ECC's one-way maze is the reverse question

Ask the easy question first

If k = 7, calculating Q = kG on our toy curve leads directly from G = (5, 1) to Q = (0, 6). Now reverse the question: given only G and Q, which k satisfies Q = kG? This is the elliptic-curve discrete-logarithm problem.

Our group contains only nineteen elements, so anyone can try one lap and discover k = 7. GF(17) is transparent teaching material and completely insecure.

Scale the maze carefully

Real systems use much larger, reviewed curves and subgroups so that the best known general attacks require impractical resources. Curve size is not the only check: point order, cofactor, validation rules, and implementation details also matter. This is why standards publish vetted domain parameters instead of inviting each project to invent a curve. [3]

'Hard' is an engineering judgment under known algorithms, resources, and threat models—not a timeless proof that reversal is impossible. Research can change that judgment.

RSA and ECC therefore create a similar public/private direction from different problems. RSA is linked to integer factorization; ECC is linked to the elliptic-curve discrete logarithm. They should not be described as the same mathematics with different key sizes.

Engineer extension: curve selection is part of the security boundary

The discrete-log slogan is not enough. A deployment must specify the field, curve, subgroup, base point, order, cofactor, encoding, validation rules, and approved operations. Implementations must also address side channels and invalid-point behavior. Reviewed standards and libraries carry these decisions so application code does not improvise them.

Page 11: public domain parameters lead to a private scalar d and public point Q equals dG
The private key is a secret number; the public key is the point it produces.

The private key is a number; the public key is a point

Publish the stage

An ECC key pair begins with a public mathematical stage: the finite field, curve equation, base point G, and the order n of G's subgroup. These domain parameters may be visible to everyone. Knowing the stage does not reveal a user's private key.

Choose one secret number

Choose an integer d from 1 through n − 1 using reliable randomness. That integer is the private key. Our d = 7 merely continues the toy example; a predictable, repeated, or biased private value would defeat a real system even if the curve itself were excellent.

Turn the number into a point

Compute the public key as Q = dG. Here, Q = 7G = (0, 6). The private key and public key are intentionally different kinds of objects: d is a secret scalar, while Q is a publishable curve point.

Given d, computing Q is direct. Given only G and Q, recovering d asks for the discrete logarithm from the previous page.

Stop before the protocol layer

We stop here on purpose. A key pair is not yet a complete communication or signature procedure. Data formats, point validation, randomness or nonces, hashing, error handling, and identity trust belong to the next layer, where each deserves a careful lesson of its own.

Page 12: ECC is summarized from its 1985 origin through finite fields, point operations, scalar multiplication, and a key pair
The lesson stops at the key pair so later protocols can be learned on a solid foundation.

Put the ECC skeleton together

Retell the origin

The story begins in 1985, when Miller and Koblitz independently saw that elliptic-curve point groups could support a forward operation with a difficult reverse direction. ECC is another public-key family, not a compact rewrite of RSA.

Retell the mathematics

Over the real numbers, y² = x³ + ax + b gives us a visible chord, third intersection, reflection, and tangent. Move the coordinates and operations into GF(p), and the continuous line becomes a finite group of discrete points. Division becomes multiplication by a modular inverse.

Repeatedly add the base point G to obtain G, 2G, 3G, …, kG. Double-and-add computes Q = kG efficiently, while recovering k from public G and Q is the hard elliptic-curve discrete-logarithm problem.

Retell the keys

In key language, the private key is a secret integer d and the public key is the point Q = dG. The toy values GF(17), G = (5, 1), and d = 7 expose every step but protect nothing.

Real systems need reviewed curves, parameters, libraries, and complete protocols. This unit has built the key pair and stops there. The next unit can ask how public points participate in cooperation and verification without mixing those applications into the foundation.

Five points to keep

  1. An elliptic curve is not an ellipse; it is a nonsingular cubic curve whose points support a carefully defined addition rule.
  2. A chord defines addition, a tangent defines doubling, and the point at infinity 𝒪 acts as the identity element.
  3. GF(p) is a finite field, not merely a remainder trick: every nonzero element has a multiplicative inverse.
  4. Scalar multiplication kG repeats point addition. The forward computation is efficient, while recovering k from G and Q is the elliptic-curve discrete-logarithm problem.
  5. An ECC private key is a secret scalar d, and the public key is the curve point Q = dG. A key pair is the foundation, not yet a complete protocol.

The next unit can build on this foundation to show how public curve points participate in cooperation and verification.

References

  1. Victor S. Miller, Use of Elliptic Curves in Cryptography, CRYPTO '85: One of the two independent 1985 proposals to build cryptosystems from elliptic-curve groups.
  2. Neal Koblitz, Elliptic Curve Cryptosystems, Mathematics of Computation 48(177): The independently developed ECC proposal received in 1985 and published in 1987.
  3. NIST SP 800-186, Elliptic Curve Domain Parameters: Official recommendations for reviewed elliptic curves, domain parameters, and use conditions.
  4. NIST SP 800-57 Part 1 Rev. 5: Key-management guidance and comparable security-strength ranges for RSA-style and elliptic-curve keys.

WORK IT BY HAND

Work it by hand: play hopscotch on a curve

Start with a game. The squares on the board are points on a curve. Everyone starts on the same square, G. I secretly decide to jump d times; that is the private key. Every jump lands far away, with no visible pattern. I announce only the square where I stop, Q; that is the public key. Can you work out d?

A hopscotch board whose squares lie along a curved path. The jump trail swings far back and forth between squares.

1Compare with RSA

If you know RSA, ECC has the same structure. It just replaces “multiplication” with “point addition”.

RSAECC
Basic operationMultiplication mod nPoint addition
Repeat d times7ᵈ mod ndG
Private keydd (number of jumps)
Public key(n, e)Q = dG (where you stop)
Hard problemFactor nFind d from Q

Both rest on the same fact: going forward is fast, going backward is hard.

2Point addition: draw a line, find the third point

Start on the real curve y² = x³ − x + 1. Point addition does not add coordinates. It is a rule for drawing lines:

  1. Pick two points P and Q on the curve.
  2. Draw the line through P and Q. It meets the curve at a third point, R.
  3. Flip R over the x-axis (change the sign of y). The result is P + Q.
  4. When P = Q, use the tangent line at P instead. That gives 2P, called point doubling.
P Q R P + Q yx
The line y = 2x − 1 passes through P = (0, −1) and Q = (1, 1), then meets the curve again at R = (3, 5). Flip it over the x-axis to get P + Q = (3, −5).

“Addition” is a line-drawing rule, and the result always lands back on the curve. Adding G again and again means hopping from point to point along the curve.

3Move to the integers: mod 17

Chips do not use real numbers. They use integers with remainders. The curve becomes y² = x³ + 2x + 2 (mod 17), with starting point G = (5, 1). The rule is the same as before, except that “division” becomes “multiply by the inverse”.

Compute one doubling, 2G. The tangent slope is λ = (3x² + 2) / (2y):

λ = (3·5² + 2) / (2·1) = 77 / 2 ≡ 9 / 2 (mod 17)
Dividing by 2 = multiplying by 9, because 2·9 = 18 ≡ 1
λ = 9·9 = 81 ≡ 13
x = λ² − 2·5 = 169 − 10 = 159 ≡ 6
y = λ·(5 − 6) − 1 = −14 ≡ 3
2G = (6, 3)

Keep adding G to get 1G–9G:

G2G3G4G5G6G7G8G9G
(5, 1)(6, 3)(10, 6)(3, 1)(9, 16)(16, 13)(0, 6)(13, 7)(7, 6)
00448812121616 123456789101112131415161718
1G–9G on a 17×17 grid. Each number is the step count k, placed at the coordinates of kG.

The points are scattered over the grid. There is no curve shape to see, and no way to guess where the next jump lands. This curve has 19 points in total, counting the point at infinity O. Jump 19 lands on O, which acts like 0; jump 20 is back at G. One lap is exactly 19 jumps.

4Try the jumps yourself

Press “Jump one step” to light up G, 2G, 3G… in order and see where each jump lands. Press “New puzzle” and the page secretly picks d (2–18) and marks only Q on the grid. Then press “Try from G, one step at a time” and count how many tries it takes to hit Q.

With only 18 points, trying one by one hits quickly. A real curve has about 2²⁵⁶ points, and the same method would never finish.

5Fast forward, slow backward

The chip knows d, so it can take big strides with double-and-add. For d = 9: 9 = 8 + 1, so G → 2G → 4G → 8G takes 3 doublings, then one addition of G gives 9G. That is 4 steps. An attacker knows only Q and must try 1G, 2G, 3G… one at a time up to 9G: 9 tries.

The gap grows fast with larger d. Take d = 181, which is 1011 0101 in binary. The rule: start from the top bit; for each following bit, double first, and if that bit is 1, add G.

Bit10110101
Actionstartdoubledouble + Gdouble + Gdoubledouble + Gdoubledouble + G
ReachG2G5G11G22G45G90G181G

G → 2G → 4G → 5G → 10G → 11G → 22G → 44G → 45G → 90G → 180G → 181G

The chip: 7 doublings + 4 additions = 11 operations. An attacker trying one by one needs up to 255 tries.

Key lengthChip (double-and-add)Attacker trying one by one
8 bitsabout 112⁸ = 256
16 bitsabout 242¹⁶ ≈ 66,000
64 bitsabout 962⁶⁴ ≈ 1.8 × 10¹⁹
256 bitsabout 3842²⁵⁶ ≈ 1.2 × 10⁷⁷

“About 1.5n” is an average: an n-bit key needs n doublings plus about n/2 additions. At 256 bits, even the best known attack takes about 2¹²⁸ ≈ 3.4 × 10³⁸ steps.

Each extra key bit costs the chip only 1–2 more operations, but doubles the attacker’s work.

6Why learn ECC: much shorter keys

For the same security strength, ECC keys are much shorter than RSA keys (NIST SP 800-57 Part 1, Table 2):

Security strengthKey length
128 bits RSA 3072 ECC 256
192 bits RSA 7680 ECC 384
256 bits RSA 15360 ECC 512

For a chip, shorter keys mean a smaller circuit, faster computation and lower power, and the key fits in a small OTP memory.

7Toy ECDH: no private key sent, same secret on both sides

Alice and Bob want to end up with the same number that only they know, over a public line. Use the same mod 17 curve:

AliceBob
Private key (kept)a = 3b = 7
PublishedA = 3G = (10, 6)B = 7G = (0, 6)
Computes after receiving3·B = 3·7G = 21G7·A = 7·3G = 21G
Result(6, 3)(6, 3)

Why (6, 3)? One lap is 19 jumps and 21 mod 19 = 2, so 21G = 2G = (6, 3), the same point computed in step 3.

Neither private key ever leaves its chip, yet both sides reach the same secret. A real system must first verify the other side’s public key with a certificate, and must pass the shared secret through a KDF to derive session keys. ECDSA is a different job: it creates a signature with the private key and verifies it with the public key. Its output is “valid” or “invalid”, not decrypted data.

Walk around the point group over GF(17)

Start at k=2 and check that 2G=(6,3). Then set k=19 and watch the point return to the point at infinity 𝒪. Finally predict k=20 before checking: the group cycle takes you back to G.

Uses the toy group y²=x³+2x+2, G=(5,1), modulo 17. Every step computes finite-field point addition. Its 19 elements are easy to enumerate and cannot protect keys.

Learning guide

Cryptography

0 / 12

Open the course outline → · Progress counts published lessons only

Prerequisites

  • Basic algebra and remainders; no prior elliptic-curve cryptography is required

What I learned

  • Explain why ECC is a different public-key path rather than a smaller RSA
  • Use chord, reflection, and tangent geometry to explain point addition and doubling
  • Explain why GF(p) supports division by nonzero elements
  • Verify scalar multiplication on the toy curve over GF(17)
  • Identify the private scalar d and public point Q = dG without jumping into a protocol

Key terms

Open glossary →

Further reading

Knowledge check

1. Which statement about an elliptic curve is correct?
2. What role does 𝒪 play?
3. Why is division by five possible in GF(17)?
4. What does 7G mean?
5. In Q = dG, which value is the private key?

Thanks for reading.

Take the concept with you, not just the terminology.

#ECC#Cryptography#Algorithms