Free through lesson 3

Blockchain Fundamentals Course

From hash functions to block chaining, mining, elliptic curves and signatures, UTXO transactions, distributed consensus, and the smart contract virtual machine. Over 30 lessons, you'll work up to building Bitcoin and Ethereum's internals with your own hands. You'll use nothing but Python's standard library — not a single external package.

about 2.5 hours in total (estimate)

Slides for this course (for classes and in-house training) →

Curriculum

The 30 lessons are split into 6 chapters. We recommend working through them in order starting from Chapter 1, but feel free to skip around to whatever interests you. * Short snippets that only use the standard library run right in your browser. For lessons that use the shared helper code (common/), run the sample code yourself with Python 3 (all output in this course was generated with Python 3.14.2).

Chapter 1 — Hashes and Blocks (lessons 1–6)

We start by pinning down exactly what problem an administrator-free ledger solves, then get hands-on with the hash functions that make it possible. You'll chain blocks together, bundle transactions with a Merkle tree, and finish by building proof-of-work and difficulty adjustment yourself.

Chapter 2 — Keys, Signatures, and Wallets (lessons 7–12)

This chapter brings "who" into the ledger. Starting from point addition on secp256k1, you'll build private and public keys, ECDSA signatures, and Bitcoin addresses by hand. You'll finish with 12-word mnemonics and HD wallets, growing an unlimited number of keys from a single seed.

7

Building secp256k1 from Point Addition

Add points on y² = x³ + 7. Scalar multiplication is fast to compute but hard to reverse — that discrete log problem becomes your key pair, as is.

about 7 min 🔒 Basic
8

A Private Key Is Just a Number, a Public Key Is Just a Point

A private key is an integer between 1 and N, and a public key is that integer times G. You'll see how to choose randomness when generating a key, down to the 33-byte compressed public key.

about 3 min 🔒 Basic
9

Proving Identity with ECDSA

Prove you signed something without ever revealing your private key. See how tampering gets rejected, how reusing nonce k leaks your private key directly, and RFC 6979's deterministic signatures.

about 3 min 🔒 Basic
10

Addresses and Base58Check

Shrink a public key to 20 bytes with hash160, then wrap it in Base58Check. You'll build a real address from private key 1 to check your work, down to how the checksum catches mistyped addresses.

about 4 min 🔒 Basic
11

How Mnemonics (BIP39) Are Made

Slice entropy into 11-bit chunks and map each to a word in a 2048-word dictionary. See what fraction of copying mistakes the checksum catches, and the official steps for deriving a seed with PBKDF2.

about 3 min 🔒 Basic
12

Growing Unlimited Keys with HD Wallets (BIP32)

Derive keys in a tree from a single seed. See why you get a different address each time, how an xpub lets you hand out addresses without sharing a private key, and hardened derivation's safety net.

about 3 min 🔒 Basic

Chapter 3 — Transactions and UTXOs (lessons 13–16)

You'll understand the UTXO model, where there's no such thing as a "balance" number, and build and sign transactions by hand. You'll actually try a double-spend — sending the same coin to two people — and see exactly where a node stops it, finishing with the UTXO selection and change calculation a wallet handles automatically.

Chapter 4 — Network and Consensus (lessons 17–20)

You'll build the waiting room transactions sit in before they make it into a block, the fee market around it, and how new coins are created along with the halving schedule. From there you'll move into a world with multiple miners, seeing how forks get resolved and actually reproducing a 51% attack that exploits that very rule.

Chapter 5 — How the EVM Works (lessons 21–25)

The stage shifts from Bitcoin to Ethereum, where you'll get a handle on the account model's way of seeing the world. From there you'll build the EVM yourself as a stack machine, understanding storage, gas, and calldata — the three pillars of smart contracts — down at the level of individual instructions.

Chapter 6 — Writing Contracts (lessons 26–30)

You'll build if and while out of nothing but JUMP, notify the outside world with events, and call contracts from other contracts. You'll finish by building an ERC-20 token and running every piece from all 30 lessons through a single chain from start to finish.

Once you've finished all 30 lessons, head over to Python Fundamentals to strengthen your foundations, or Python Security Fundamentals to add an attack-and-defense perspective. A membership unlocks every course.