Bitcoin cryptography is usually explained with hand-wavy metaphors, so let’s not do that here. Most explainers wave their hands at “cryptography secures the blockchain” and move on. I’d rather not do that — partly because the actual math is genuinely elegant, and partly because understanding it changes how you think about custody, security, and what “owning crypto” really means. This one’s a bit denser than Part 1, but I’ll keep it in plain language throughout.
Bitcoin Cryptography, Part 1: Private Keys and Public Keys
Everything starts with a private key — in Bitcoin’s case, just a random 256-bit number. Think of it like your email password: the one thing that proves you’re you, and the one thing you must never share.
From that private key, you derive a public key using a mathematical function. The relationship works like an email address paired with that password: your public key can be freely shared (it’s how people send you money), while your private key stays secret. The critical property is asymmetry — computing the public key from the private key is easy, but going the other direction is, for all practical purposes, impossible.
Bitcoin generates this pairing using elliptic curve cryptography (specifically an algorithm called ECDSA). Without getting lost in the algebra: your public key is calculated by “multiplying” your private key against a fixed starting point on a specific curve. That operation is a one-way street — trivial to compute forward, and computationally infeasible to reverse, because doing so would mean searching through roughly 2^256 possibilities. To put that number in perspective, it’s larger than the number of atoms in the observable universe. This isn’t “hard for today’s computers” hard — it’s “the sun will burn out first” hard, and remains so even accounting for realistic near-term advances in computing power.
Going from private key to public key is easy. Going backward is, for all practical purposes, impossible.
Hash Functions: The Other Half of the Puzzle
The second pillar is the cryptographic hash function. A hash function takes an input of any size — a word, an image, an entire file — and compresses it into a fixed-length output called a digest (for Bitcoin, a 256-bit string, via an algorithm called SHA-256). A few properties make this useful:
Deterministic: the same input always produces the same output.
Fast to compute: verifying a hash should take almost no time.
Collision-resistant: it should be practically impossible to find two different inputs that produce the same hash.
Hiding (preimage-resistant): given the output, you should learn essentially nothing about what the input was — you can’t work backward from the digest to the original data.
The avalanche effect: flip a single character in the input, and the output changes completely and unpredictably. Try it yourself — plenty of free SHA-256 tools online will let you hash “hello” and then “Hello” and watch the outputs have nothing in common.
Hash functions do a surprising amount of work in a blockchain system:
Saving space. Instead of storing and comparing entire files, you can store and compare their much smaller hashes.
Hash pointers. A data structure that combines a pointer to where data is stored and a hash of that data — so you can verify the data hasn’t been tampered with, not just find it.
A hash pointer: one field to find the data, one field to prove it hasn’t changed.
Securing history. Chain enough hash pointers together (each block’s header contains the hash of the block before it) and you get a tamper-evident log: change anything in an old block, and every subsequent hash breaks, instantly revealing the tampering. This is the actual mechanical reason blockchains are described as “immutable.”
Chain enough hash pointers together and you get a tamper-evident log — edit any old block, and every hash after it breaks.
Digital Signatures: Proving You Own What You’re Spending
The last piece ties the first two together. A digital signature lets you prove — mathematically, not just by assertion — that you are the rightful owner of a private key, without revealing the key itself. When you send a Bitcoin transaction, you’re not transmitting your private key; you’re producing a signature (built from a specific equation involving your private key, a random number, and the transaction message) that anyone can verify against your public key. The network checks that the signature is valid, confirms you’re authorized to move those funds, and only then adds your transaction to the pool waiting to be included in a block.
This is why the phrase “not your keys, not your coins” gets repeated so often in crypto circles: the private key isn’t just a security measure, it’s the only proof of ownership the system recognizes. There’s no customer service line to call if you lose it, and no password-reset email — a theme we’ll come back to directly in Part 3, when we look at exactly how much Bitcoin has been permanently lost this way, and what that means for anyone thinking about self-custody.
Why This Still Matters in 2026
None of this math has changed, and it isn’t going to — ECDSA and SHA-256 are as sound today as they were when this was taught. The one asterisk worth knowing about: the theoretical (not yet practical) long-term threat from quantum computing has become a much more mainstream conversation since 2020, and Ethereum’s own developers have publicly discussed “quantum-safe” upgrade paths as a long-horizon research item on the roadmap. Nothing to act on today, but a genuinely interesting thread if you want to go down that rabbit hole.
This is Part 2 of a 15-part series. Part 3 covers crypto wallets, custody, and the real-world history of hacks and losses. Part1 is here
Bitcoin reaches consensus without any central authority through a specific set of rules — this is the post that ties Parts 2 and 3 together into an actual working system. You now know how keys and signatures prove ownership. But proving you signed a transaction doesn’t answer a much harder question: in a network of…
This is the post in this series where my old course notes are most out of date — and honestly, that’s exactly why it’s worth writing. Going back through the original slides, they describe Ethereum (the version for ETH 2.0) as a future, three-phase upgrade, with sharding as part of “phase two,” and a supply…
What is blockchain, really? I studied this material properly, in an MBA-level ‘Cryptoeconomics & Blockchain Technologies’ course a few years back, and I’ve been sitting on the notes ever since. The goal of this series isn’t to rewrite a blockchain textbook. It’s to take what I learned then, separate the concepts that aged well from…