MASTERING-BITCOIN
| Formula | Name | Meaning |
|---|---|---|
| secp256k1 curve | Bitcoin's elliptic curve over a finite field | |
| Public key from private key | Scalar multiply the generator by private scalar | |
| Private key space size | Comparable to the number of atoms in the observable universe () | |
| Elliptic curve point addition | Line through hits curve at a third point; reflect across x-axis |
Bitcoin's curve is secp256k1, defined by with .
Explore how the curve's shape changes as you vary and . Bitcoin's choice of gives a clean, symmetric shape.
β interactive visualization β coming to this page format soon
Notice: The curve is always symmetric about the x-axis (because of the term). For Bitcoin's choice , the curve has no "bump" or extra component β it's a single smooth branch going to infinity.
In the real Bitcoin curve, all arithmetic is done modulo a very large prime . That turns this smooth shape into a scatter of discrete points β but the algebraic rules stay the same.
On an elliptic curve we define a special "addition" of points:
Use the sliders to choose the x-coordinates of and (both on the upper branch), and watch the addition happen.
β interactive visualization β coming to this page format soon
Reflect: The orange Γ is where the line hits the curve a third time. The purple dot (the sum) is that third point reflected across the x-axis.
Repeating this rule β adding to itself over and over β is how we get . For a 256-bit , naively doing additions is impossible, but double-and-add lets us compute in about 256 doubling steps. That's why signing is fast.
A Bitcoin private key is a random 256-bit number. That means it's one of possible values.
Slide the key size and compare the resulting key-space against familiar astronomical quantities (shown on a logarithmic scale).
β interactive visualization β coming to this page format soon
Notice: At 256 bits, the key space () is within a few orders of magnitude of the total number of atoms in the observable universe (). This isn't a computing problem β it's a physics problem. No amount of hardware can brute-force this.
Question 1
A common misconception is that Bitcoin encrypts transactions to keep them private. What does Bitcoin actually do?
β Correct! Bitcoin uses signatures, not encryption. Transactions are public; what's proven is authorship.
β Not quite. Every Bitcoin transaction is fully visible on the public ledger β nothing is encrypted. What matters is who authored it.
Solution:
Bitcoin transactions are fully public β amounts, sender addresses, and receiver addresses are all visible on the blockchain. Bitcoin does not encrypt them.
What Bitcoin uses is a digital signature: Alice signs the transaction with her private key, and anyone can verify β using her public key β that the signature is valid.
Bitcoin needs the second, not the first. That's precisely why the network can be simultaneously open (everyone sees everything) and secure (only the key-owner can spend).
Question 2
A Bitcoin private key is a random 256-bit number. Approximately how many possible private keys exist?
β Correct! , putting it within a few orders of magnitude of every atom in the observable universe.
β Not quite. Remember: 256 bits means possibilities. Convert via .
Solution:
A 256-bit key means 256 binary digits, each independently 0 or 1. The total count of possibilities is:
Converting powers of 2 to powers of 10:
For comparison, the observable universe contains roughly atoms β just a few orders of magnitude larger. This is why brute-forcing is physically impossible.
Question 3
Bitcoin's public key is computed as , where is the private scalar and is the fixed generator point. Which direction of this equation is hard (the trap-door), and why?
β Correct! Forward () takes milliseconds. Reverse () is the ECDLP β no known shortcut.
β Not quite. Think about the 'trap-door' idea: one direction must be easy (signing), the other must be impossible (stealing the key).
Solution:
The forward direction is fast thanks to the double-and-add algorithm, which computes in roughly 256 point-doublings β milliseconds on any laptop.
The reverse direction β recovering from β is the Elliptic Curve Discrete Logarithm Problem (ECDLP). No algorithm is known that solves it faster than brute force. This asymmetry is the trap-door:
This is what lets Alice publish her public key to the whole world. Anyone can verify it came from some private key, but nobody can figure out which one.
Question 4
True or False: For Alice to send a valid, verifiable transaction to Bob, she must transmit her private key to the Bitcoin network so nodes can check her identity.
β Correct! The private key never leaves Alice's device. Only the signature and public key are broadcast β verification uses only public information.
β Not quite. If Alice transmitted her private key, anyone could steal her coins. Signatures are designed so nodes verify using only the public key.
Solution: False.
Alice's private key never leaves her device. Here's the actual flow:
If she ever transmitted her private key, anyone intercepting it could steal all her coins. The whole point of public-key cryptography is that verification uses only the public half.
This same principle secures TLS (HTTPS), SSH logins, and encrypted messaging.
Solved: 0 / 4