Tool · Keys & addresses

Toy elliptic curve

Add points and multiply on a curve small enough to draw

Toy elliptic curve

y² = x³ + 7, the same equation as Pearl’s keys, on a tiny grid

001122334455667788991010111112121313141415151616QP−(P+Q)P+Q

(6, 6) + (1, 5)

= (8, 14)

Draw the line through P and Q (the shaded cells; on a grid mod 17 a line wraps around the edges). It hits exactly one more curve point, −(P+Q). Flip it across the middle line to get P + Q.

Field
0 … 16, mod 17
Points
18 (17 + O)
G
(6, 6)
Order of G
18

The real thing: secp256k1, the same equation over a prime of about 2²⁵⁶. It has about 1.16 × 10⁷⁷ points, far too many to draw or to search.

Runs in your browser · a toy, not real keys src/lib/keys.ts · toyCurve

What it does

The dots are every point on y² = x³ + 7 where x and y are whole numbers from 0 to p − 1, counting “mod p”. Click two points to add them, or switch to Multiply k·G and step through G, 2G, 3G… Try mod 43 or mod 97 for a bigger grid.

How to read it

  • Adding P + Q: draw the line through P and Q. On a grid mod p the line wraps around the edges (the shaded cells). It meets exactly one more curve point; flip that point across the middle line to get P + Q.
  • Doubling: pick the same point twice. The line becomes the tangent at P.
  • If the line is vertical, the sum is O, the point at infinity, which acts like zero.
  • Multiplying: k·G means adding G to itself k times. The walk jumps around the grid with no visible pattern. Computing k·G is quick; finding k from the result has no known fast method. That one-way street is what protects a private key.

Pearl specifics

Pearl’s keys use secp256k1: the same equation, y² = x³ + 7, over a prime of about 2²⁵⁶, with about 1.16 × 10⁷⁷ points. A private key is k; the public key is k·G. Nothing here is drawn from that real curve: this is a toy.

Under the hood

Runs entirely in your browser. Point addition, doubling, multiplication and the point counts come from toyCurve and makeToyCurve in src/lib/keys.ts; a unit test checks the mod-17 curve’s points and group structure. The tool only draws what the library computes.

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.