How Bitcoin's crypto actually works

An interactive, no-math-degree-required look at the two pieces that keep a private key private: the elliptic-curve discrete-log problem (ECDLP) and SHA-256. Play with the curve, feel why going backwards is impossible, and watch one flipped bit shatter a hash.

1 · Point addition on an elliptic curve

Bitcoin uses the curve y² = x³ + 7 (secp256k1). You can "add" two points with a ruler: draw a line through P and Q, find the third point it hits, and flip it over the x-axis. That's P + Q. Adding a point to itself ("doubling") uses the tangent. Drag P and Q.

drag the points
Drag P and Q, then press Add. The grey line is the geometry; R is the result.

Real Bitcoin keys use the same rule, but over a finite field of 256-bit integers instead of the smooth picture above — so the points look like random dust, not a curve. The geometry is identical; only the visual is messy.

2 · The one-way trap (discrete log)

Your private key is just a number k. Your public key is the point k·G — start at a fixed point G and "add" it to itself k times. Going forward (k → k·G) is fast. Going backward (k·G → k) is the trap: the points hop around with no pattern, so the only way back is to try every k. Here's a toy curve with just a handful of points — watch k·G jump.

See how k·G teleports with no "warmer / colder"? On the real curve there are ~10⁷⁷ points. Even a planet-sized computer checking a trillion keys a second since the Big Bang wouldn't finish a rounding error of the search.

3 · How big is 2²⁵⁶, really?

A private key is one number between 1 and about 2²⁵⁶. People say "brute force it." Let's make the number physical.

This is why nobody "cracks" a strong key. Bitcoin isn't safe because the math is secret — it's open. It's safe because the search is larger than the physical universe. (The real danger is never the curve; it's a weak key made by broken randomness — which is a different, fixable bug, not a broken curve.)

4 · SHA-256 and the avalanche effect

An address is derived with SHA-256, a one-way mixer. Flip a single bit of the input and ~half of the 256 output bits flip — unpredictably. Type anything; the twin below changes one character so you can see the shatter.

left = your text · right = same text with the last char bumped by 1
SHA-256( )
SHA-256( )

No "warmer/colder" signal here either — that's what one-way means. You can't nudge the input toward a target hash; you can only guess and check. Same wall as the curve, different shape.

So what actually breaks a key?

Never the curve or the hash — those are the universe-sized walls you just played with. Real coins are lost to broken randomness: a reused signature nonce, or a key made from a guessable phrase. That's a fixable bug, not a broken curve. Two classic ways:

Locked out of a wallet you own? If you still remember part of the key or passphrase, that same math can rebuild access — authorized recovery → (owner-only, never a scan of strangers' funds).

Wondering about those old "abandoned" wallets with millions inside? Why you can't just crack one →