Skip to content

Part 1 · Cryptographic Foundations

Bitcoin is not “encryption” (it barely encrypts anything). It’s an application of a few specific cryptographic primitives. Master these four and the rest of Bitcoin is just clever arrangements of them.

PrimitiveThe job it does in BitcoinAnswers our question by…
Hash functions (SHA-256)Fingerprint data; create the “work” in Proof of Work; link blocksmaking history tamper-evident and making influence costly
Public-key cryptographyGive each user a keypair — a public identity and a secretletting anyone verify ownership without a central registry
Digital signatures (ECDSA, now also Schnorr)Prove you authorized a transaction without revealing your secretletting strangers trust a spend without trusting the spender
Merkle treesSummarize all transactions in a block into one hashletting nodes verify membership cheaply

Keep asking the course’s recurring question for each one: how does this help untrusting strangers agree on one ledger?

This trips up almost everyone. Encryption hides data so only a key-holder can read it, and it is reversible by design. Bitcoin’s ledger is the opposite — it’s public, so every stranger can verify it without permission. The two primitives it actually leans on are not encryption at all:

OperationReversible?PurposeBitcoin uses it to…
HashingNo — one-wayfingerprint / commitmake txids, the Merkle root, and the PoW “work”
Signingn/a — proves, doesn’t hideauthorizeprove a spend came from the key’s owner
EncryptionYes — with the keyconfidentialitybarely used (a wallet may encrypt its key file)

A Bitcoin transaction is signed, hashed, and published in the clear — never encrypted. Confusing “crypto” (cryptography) with “encryption” is the first thing to unlearn.

How the four cooperate (one transaction’s life)

Section titled “How the four cooperate (one transaction’s life)”

The primitives aren’t separate tricks — they interlock in a single flow:

1. You SIGN the transaction with your private key → digital signature (ownership)
2. The transaction is HASHED to get its txid → hash function (identity)
3. Many txids are folded into one MERKLE ROOT → Merkle tree (membership)
4. Miners HASH the block header against a target → hash function (the "work")
└─► untrusting strangers can now independently accept the block as part of the one ledger

That spine — sign → hash → commit → prove-work — is the cryptographic skeleton the rest of the book hangs on.

  1. Hash functions (SHA-256) — ✅ written. The single most-used primitive in Bitcoin. Determinism, the resistance properties, the avalanche effect, and a hands-on exercise.
  2. Public-key cryptography & secp256k1 — ✅ written. Private keys, public keys, and why you can share one but never the other (the one-way trapdoor of elliptic-curve scalar multiplication, and the exact curve Bitcoin runs on).
  3. Digital signatures (ECDSA & Schnorr) — ✅ written. How a signature proves authorization, how it’s verified, the fatal nonce-reuse trap worked through with real arithmetic, and how Schnorr (added by Taproot in 2021) enables key aggregation — see also Taproot, Schnorr & MuSig2.
  4. Merkle trees — ✅ written. Hash trees, the log₂ n proof size, the odd-node CVE, and the root in a block header that powers lightweight (SPV) clients.

Begin with Hash functions (SHA-256) →