Level 3 · How it worksThe village#181

Elliptic curves for normal people: easy to walk, impossible to count back

An elliptic curve, as used in Bitcoin, is a fixed set of points with a rule for stepping from one to the next. Your private key is how many steps you take from an agreed starting point, and your public key is where you end up. Walking is quick; working out the number of steps from the end point is practically impossible.

On the village green there's a ring of numbered stones and a rule painted on a board: from this stone, the next step takes you to that one. Everybody starts at the same stone, by the fountain. Everybody follows the same rule.

Anna picks a secret number and walks that many steps. Then she stops. Everyone can see which stone she's on. Nobody saw her walk. To find her number, Ben would have to walk the whole route himself, counting, until he lands on her stone.

On a green with nine stones, that takes Ben a minute. Bitcoin's green has a 78-digit number of stones. That's an elliptic curve, and that's why your public key can't be walked back to your private key.

What it is

An elliptic curve, for cryptography, is a set of points that fit a simple equation, plus a rule for "adding" two points to get a third. Bitcoin uses a curve called secp256k1, defined in a standard called SEC 2. Its equation has the shape y squared equals x cubed plus a times x plus b, with a set to 0 and b set to 7 (SEC 2, 2010). So: y squared equals x cubed plus 7.

The arithmetic doesn't run on ordinary numbers. It wraps around at a fixed prime, like a clock wraps around at 12. On a clock, 9 plus 5 is 2. On secp256k1, the clock has a 78-digit number of hours.

The idea of using such curves for cryptography was published by Victor Miller at the CRYPTO '85 conference (Miller, 1986) and by Neal Koblitz in 1987 (Koblitz, 1987).

How it works: a curve with nine stones

Take Bitcoin's equation, y squared equals x cubed plus 7, and wrap it around a tiny clock of 17 instead of a giant one. We worked through this ourselves; it's plain arithmetic.

  1. Find the stones. Exactly 17 pairs of whole numbers from 0 to 16 fit the equation on a 17-hour clock. One of them is (1, 5): 1 cubed plus 7 is 8, and 5 squared is 25, which on a 17-hour clock is also 8. Add one extra "zero" point that the rules require, and the green has 18 stones.
  2. Pick the start. Choose (1, 5) as the starting stone by the fountain, and count it as step 1. Following the adding rule, step 2 lands on (2, 10). Then (5, 9). Then (12, 1). Then (12, 16), (5, 8), (2, 7), (1, 12). Step 9 lands on the zero point, and the walk starts over. This start has a loop of nine.
  3. Make a key pair. Anna's private key is 4. Step 4 is (12, 1). That's her public key.
  4. Ben counts. He sees (12, 1). He walks from the fountain: one, two, three, four. Found it. With nine stones, guessing is easy.
  5. Make the green enormous. On secp256k1, the clock size p is 2 to the power of 256, minus 2 to the power of 32, minus 977: a 78-digit prime. The number of steps before the loop closes, called n, is also 78 digits long, about 1.158 times 10 to the power of 77. The starting stone, G, is printed in SEC 2 and begins 79BE667E (SEC 2, 2010).

Here's the trick that makes it work. Anna doesn't walk one step at a time. The rules let her jump: double, double again, add, double. Even a 78-digit number of steps takes her only a few hundred jumps. Ben has no such shortcut backwards. He's left counting stones.

Why it matters

Your Bitcoin keys are exactly this. The private key is a number of steps. The public key is the stone. Bitcoin's signatures use "the Elliptic Curve Digital Signature Algorithm (ECDSA) with the secp256k1 curve" (Bitcoin developer guide), so the same walk lets you sign and lets everyone check.

Why curves rather than the older prime-number tricks? Size. NIST's signature standard rates ECDSA keys whose n is 256 to 383 bits long at "approximately len(n)/2; at least 128 bits" of security (NIST FIPS 186-5). A 256-bit key gives about 128 bits, which is enormous protection for a number you could write on an index card. Miller argued for speed back in 1985: his curve scheme "appears to be about 20% faster" than the Diffie and Hellman method on ordinary prime numbers (Miller, 1986).

Why this curve? SEC 2 calls secp256k1 a Koblitz curve and says these "admit especially efficient implementation" (SEC 2, 2010). Every node checks every signature, so fast checking matters to everyone.

Who gains: anyone with a key, which fits in 32 bytes. Who pays: anyone who picks their number of steps badly. A curve can't protect a number that isn't random.

Where people get it wrong

  • "An elliptic curve is an oval." Despite the name, Bitcoin's curve isn't an ellipse. And on a clock of whole numbers it isn't a smooth line at all: it's a scatter of points, like the stones on the green.
  • "The public key is the private key, hidden." It's where the walk ended. Knowing the destination and the route rule doesn't tell you the number of steps.
  • "Somebody owns or controls the curve." The curve is a set of published numbers in SEC 2. Every wallet and node uses the same ones, and anyone can check them.
  • "128 bits of security sounds half as good as 256." Each extra bit doubles the work. 128 bits is 2 to the power of 128 operations, a 39-digit number.
  • "Nothing can ever count the steps." Nothing known can, on ordinary computers. NIST's report IR 8547 (October 2026) says ECDSA is "vulnerable to Shor's Algorithm on a cryptanalytically relevant quantum computer" (NIST IR 8547). That's the subject of a later article in this section.

Check the number, not the curve

You will never need to touch the curve. What you can check is the one input it can't protect: the number of steps. Make sure your wallet generated its keys itself, from its own randomness, and that nobody handed you a seed phrase or a "pre-made wallet". A number someone else chose is a number someone else knows.

The curve keeps your secret perfectly. It just can't tell whether you made it up yourself or bought it from the stranger at the gate.

Frequently asked questions

What is an elliptic curve in cryptography?

It's a set of points that fit an equation of the form y squared equals x cubed plus ax plus b, calculated on a clock of whole numbers that wraps at a large prime. Points can be "added" by a fixed rule, which lets you step from a starting point many times in a way that is easy forwards and practically impossible to reverse.

What curve does Bitcoin use?

Bitcoin uses secp256k1, defined in the SEC 2 standard from the Standards for Efficient Cryptography Group. Its equation is y squared equals x cubed plus 7, over a prime field of about 2 to the power of 256.

How is a public key made from a private key?

The private key is a number. The wallet takes a fixed starting point on the curve, called G, and "adds" it to itself that many times, using doubling shortcuts so it takes only a few hundred operations. The point it ends on is the public key.

Why are elliptic curve keys so short?

NIST's signature standard rates a curve key with a 256-bit n at about 128 bits of security, half its length. That is enough protection for a key that fits in 32 bytes.

Can quantum computers break elliptic curve cryptography?

In principle, yes. NIST's report IR 8547, finalised in October 2026, says ECDSA is vulnerable to Shor's algorithm on a cryptanalytically relevant quantum computer. How real that risk is for Bitcoin, and what an upgrade would need, is covered in our article on quantum computing and crypto.

Sources

  1. Standards for Efficient Cryptography Group, SEC 2: Recommended elliptic curve domain parameters, version 2.0 (27 January 2010)
  2. NIST, FIPS 186-5 Digital Signature Standard (3 February 2023)
  3. Victor S. Miller, Use of elliptic curves in cryptography, Advances in Cryptology CRYPTO '85 (Springer, 1986)
  4. Neal Koblitz, Elliptic curve cryptosystems, Mathematics of Computation 48 (1987), pages 203 to 209
  5. Bitcoin developer guide, Transactions
  6. NIST, IR 8547 Transition to post-quantum cryptography standards (October 2026)

Read next.