Skip to content

Revision · Cryptographic Foundations

Part 1 established that Bitcoin invents almost no new cryptography — its genius is arrangement. The throughline is four heavily-studied primitives and the single flow that ties them together: sign, hash, commit, prove-work.

  • Bitcoin is not encryption — its ledger is public by design; the primitives it actually leans on are hashing (one-way commitment) and signing (authorization), not confidentiality, so a transaction is signed, hashed, and published in the clear.
  • Hash functions (SHA-256) — a deterministic, fixed-size, one-way fingerprint whose collision resistance makes the chain tamper-evident and whose avalanche effect turns mining into a blind lottery; it’s the single most-used primitive.
  • Why 256 bits and why twice — the birthday bound means a 256-bit hash buys only ~128-bit collision security (hence the oversized digest), and double-SHA-256 defends against SHA-256’s length-extension quirk.
  • Public-key cryptography (secp256k1) — a private key d and public point Q = d·G where computing Q is fast but recovering d (the ECDLP) is infeasible, letting the ledger name owners with no registry — an “account” is just whoever can produce the key.
  • Security lives in entropy, not the curve — brain wallets proved the math is bulletproof but human-chosen keys get swept in seconds, so real 256-bit randomness is where safety actually resides.
  • Digital signatures (ECDSA & Schnorr) — a number only d can produce yet anyone can verify with Q, delivering authenticity, integrity, and non-repudiation; the nonce k is as sensitive as the key, and reusing it leaks d outright (the 2013 Android thefts).
  • Schnorr’s linearitys = k + e·d is a straight line, so keys and signatures add, letting many signers aggregate into one 64-byte signature (MuSig2) that looks like a single-sig on chain — something ECDSA’s k⁻¹ term blocks.
  • Merkle trees — thousands of transactions fold into one 32-byte root by hashing pairs upward, so proving membership costs only log₂(n) sibling hashes; the odd-node duplication rule once enabled CVE-2012-2459.

These four primitives are the entire cryptographic toolkit the rest of the book arranges: hashing gives fingerprints and the “work,” keys give identity without a registry, signatures give forgery-proof authorization, and Merkle trees make membership cheap enough for a phone to verify. Each answers the recurring question by making some check independently verifiable by any stranger. Next we arrange them into the first real object: a transaction.