Practical Cryptography and Distributed Ledgers
- Pablo Deymonnaz
- Diego Kingston
- Federico Carrone
The ZK proving systems landscape has exploded. Circle STARKs (Starkware/Stwo) operate over the Mersenne31 field, enabling dramatically faster proof generation by exploiting the structure of circles over finite fields. Binius (Irreducible) works over binary tower fields, achieving the smallest proofs for binary circuits. Jolt/Lasso (a16z) use lookup arguments to verify RISC-V execution without custom circuits -- this is the "lookup singularity" approach where the prover just commits to a trace and proves lookups into predefined tables. Folding schemes (Nova, HyperNova, SuperNova from Microsoft Research) are the other major paradigm shift: instead of proving a computation all at once, you incrementally fold instances together, enabling IVC (Incremental Verifiable Computation) for long-running computations like blockchain state transitions.
Post-quantum cryptography has moved from research to deployment: NIST finalized FIPS 203 (ML-KEM, lattice-based key encapsulation), FIPS 204 (ML-DSA, lattice-based signatures), and FIPS 205 (SLH-DSA, hash-based signatures). Chrome and Signal already ship post-quantum key exchange. The FHE entries (Zama's fhEVM, Concrete ML) show fully homomorphic encryption becoming practical for specific use cases -- encrypted on-chain computation and private ML inference -- though it remains orders of magnitude slower than plaintext for general computation.
Table of Contents
1. Foundations of Cryptography
- Groups, Rings and Fields
- Finite Fields
- Modular Arithmetic
- Polynomials over a Field
- P versus NP problem
- Computationally Hard Problems: Factorization and the Discrete Logarithm
- Elliptic Curves
- Elliptic Curves Pairings and Field Extensions
Readings
Exercises
2 Symmetric encryption
- Stream ciphers and block ciphers
- AES
- AES operation modes
- ChaCha20
- Security definitions.
- Attacks on block and stream ciphers.
3. Asymmetric encryption
- Diffie-Hellman Key Exchange
- ECDH
- ElGamal
- RSA
- PKCS
Readings
4. Hash Functions, MAC and Signatures
- Properties of cryptographic hash functions
- Merkle-Damgard construction
- MD5
- SHA1
- Sponge constructions
- Keccak - SHA3
- Message Authentication Codes
- ECDSA signature
- Schnor signature
- BLS signature
Readings
5. What is Money?
6. Introduction to blockchains and cryptocurrencies
- What is a blockchain?
- State Machines
- Consensus
- Merkle Trees
Readings
- Why cryptocurrencies are interesting? - Motivates why permissionless digital money and programmable contracts matter beyond speculation
- Cancelled Nickel Trades on the LME - Video showing how the London Metal Exchange reversed trades to bail out insiders, illustrating why immutable ledgers matter
- What is a Blockchain - Ittai Abraham - Formal definition of a blockchain as a replicated state machine with safety and liveness properties
- How does everything tie together? - Connects the building blocks of blockchains: cryptography, consensus, state machines, and incentives
- Blockchains as Cryptographic Data Structures - Pramod Viswanath - Lecture notes formalizing blockchains as authenticated data structures using hash chains and Merkle trees
- Hash functions - Explains how cryptographic hash functions provide data integrity and proof-of-work in blockchains
- Merkle Tree - Introduces Merkle trees and how they enable efficient verification of data in blocks
- What is a Merkle Tree - Formal treatment of Merkle trees covering proofs of inclusion, exclusion, and their role in light clients
- What is Consensus? - Kartik Nayak, Ittai Abraham - Rigorous definition of consensus covering agreement, validity, and termination properties
- Flavours of State Machine Replication - Ittai Abraham - Taxonomy of SMR variants: crash vs Byzantine failures, synchronous vs asynchronous, and their trade-offs
- Consensus for State Machine Replication - Kartik Nayak, Ittai Abraham - Shows how single-shot consensus is extended to replicate a full state machine across nodes
- From Single-Shot Agreement to State Machine Replication - Walks through the reduction from state machine replication to repeated instances of consensus
- On settlement finality - Ethereum Blog - Distinguishes probabilistic finality (Bitcoin) from economic finality (PoS) and their practical implications
- Finality in Blockchain Consensus - Mechanism Labs - Compares different finality models across blockchain protocols and their security guarantees
- The mystery behind block time - Explains how block time is determined by difficulty adjustment and its relationship to security and throughput
- What everyone gets wrong about 51% attacks - Dankrad Feist - Clarifies that 51% attacks cannot steal funds or change rules, only double-spend and censor transactions
- Blockchain papers - decrypto-org - Curated collection of academic blockchain research papers organized by topic
- An Empirical Analysis of Chain Reorganizations and Double-Spend Attacks on Proof-of-Work Cryptocurrencies - MIT - Measures how often chain reorgs actually happen in practice and quantifies real-world double-spend risk
Videos
7. Bitcoin
- Two general's Problem
- What Is the Byzantine Generals Problem?
Readings
- The Byzantine Generals Problem - The original Lamport, Shostak, and Pease paper proving consensus requires more than two-thirds honest participants
- Blockchain Basics & Consensus - MIT 15.S12 Blockchain and Money - Gary Gensler - MIT lecture series covering blockchain fundamentals, proof-of-work, and how Bitcoin achieves consensus
- Paxos(etcd) vs. Nakamoto(Bitcoin): consensus - Side-by-side comparison of classical BFT consensus (Paxos) and Nakamoto consensus trade-offs
- Nakamoto's Longest-Chain Wins Protocol - Formal analysis of why following the longest chain achieves consensus under honest majority assumptions
- Learning-Bitcoin-from-the-Command-Line - Hands-on tutorial for interacting with Bitcoin Core via CLI, covering wallets, transactions, and scripting
- Bitcoin: A Peer-to-Peer Electronic Cash System - The original Satoshi Nakamoto whitepaper describing proof-of-work, the UTXO model, and the incentive structure
- But how does bitcoin actually work? - Visual explanation by 3Blue1Brown of how digital signatures, hashing, and proof-of-work combine to form Bitcoin
- Cryptoeconomics In 30 Minutes by Vitalik Buterin - Vitalik explains how economic incentives and cryptography work together to secure decentralized protocols
- The differences between a hard fork, a soft fork, and a chain split - Clarifies how protocol upgrades work and when they cause chain splits versus backward-compatible changes
8. Ethereum
- Solidity
- ERC20
- ERC721
- ERC-1155
- Merkle Patricia Trie Tree
Readings
- DEVCON1: Understanding the Ethereum Blockchain Protocol - Vitalik Buterin - Vitalik walks through Ethereum's architecture including accounts, gas, the EVM, and state transitions
- Ethereum Whitepaper - The founding document describing Ethereum as a general-purpose programmable blockchain with smart contracts
- Learn Solidity in Y Minutes - Quick-reference syntax tour of Solidity covering types, functions, modifiers, and common patterns
- Getting Started with Solidity - Beginner tutorial covering Solidity basics, contract structure, and deploying your first smart contract
- OpenZeppelin - Battle-tested library of reusable smart contracts for ERC20, ERC721, access control, and upgradeable proxies
- Go Ethereum - Official documentation for Geth, the most widely used Ethereum execution client written in Go
- Trie, Merkle, Patricia: A Blockchain Story - Explains how Ethereum combines tries, Merkle trees, and Patricia trees to store world state efficiently
- Ethereum development made easy with Foundry - Getting started guide for Foundry, a fast Rust-based toolchain for compiling, testing, and deploying Solidity
- scaffold-eth: forkable Ethereum dev stack focused on fast product iterations - Full-stack Ethereum starter kit with React frontend, Hardhat backend, and one-command local deployment
- Scaffold-Eth Challenges - Progressive coding challenges to learn Ethereum development by building real DeFi and NFT projects
- solmate - Modern, opinionated, and gas optimized building blocks - Rari Capital - Gas-optimized Solidity library providing minimal, audited implementations of common token and auth patterns
- CNBC: People are paying millions of dollars for digital pictures of rocks (NFTs) - News piece illustrating the NFT mania of 2021 and how ERC-721 tokens created a digital collectibles market
9. Wallets, Dapps and DeFi
- DEX: Uniswap
- Lending: Aave
- Stablecoin: Maker/DAI
- dYdX
- Metamask and other wallets - Browser extension wallet for interacting with Ethereum dApps, managing keys, and signing transactions
- DEMO: Uniswap, Curve, OpenSea NFTs, Maker/Oasis, Multisig
- lil web3: Small, focused, utility-based smart contracts - Minimalist implementations of common web3 protocols like ENS, Uniswap, and NFT marketplaces for learning
- Programming DeFi: Uniswap V2. Part 1 - Build Uniswap V2 from scratch: core pair contract, constant product formula, and liquidity provision
- The Problems with DeFi & Crypto - Critical analysis of DeFi risks including smart contract bugs, oracle manipulation, and systemic leverage
- Programming DeFi: Uniswap V2. Part 1 - Line-by-line annotated walkthrough of the official Uniswap V2 Solidity source code
- Programming DeFi: Uniswap V2. Part 2 - Implements the Uniswap V2 router, multi-hop swaps, and slippage protection
- Programming DeFi: Uniswap V2. Part 3 - Adds flash swaps, price oracles via TWAP, and protocol fee mechanisms to the Uniswap V2 implementation
- Uniswap V3 Development Book - Full book on building Uniswap V3 with concentrated liquidity, tick-based accounting, and multiple fee tiers
- Hayden Adams Explains Uniswap and the Rise of DeFi - Uniswap creator tells the origin story and explains how automated market makers replaced order books
- What's the simplest possible decentralized stablecoin? - Jacob Eliosoff - Thought experiment exploring the minimal mechanism needed to peg a token to a dollar without centralization
- Awesome Foundations of DeFi - Mikerah - Curated list of academic papers on AMMs, lending protocols, liquidations, and other DeFi primitives
10. Oracles, Bridges and Rollups
- Oracles
- Bridges
- An Incomplete Guide to Rollups - Vitalik explains how optimistic and ZK rollups scale Ethereum by executing off-chain while posting data on-chain
11. EVM
12. Security
13. MEV
14. Zcash, SNARKs and Privacy in blockchains
15. Scaling blockchains
- Data Availability
- Optimistic versus Zero Knoweledge Rollups
- Circom, Cairo, Noir
Readings
16. Tendermint, HotStuff and Narwhal
17. Bitcoin: SegWit, Taproot, Lightning Network and Covenants
Books
- Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction - Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller, and Steven Goldfeder - Textbook covering Bitcoin mechanics, mining, anonymity, and altcoins; suitable for students and developers new to crypto
- Security Engineering - Ross Anderson - Encyclopedic reference on building secure systems, covering cryptography, protocols, and real-world failure case studies
Blockchain
Cryptography
Abstract Algebra and Number Theory
Courses
- Practical Cryptographic Systems - Matthew Green - Johns Hopkins course on real-world cryptography covering TLS, secure messaging, cryptocurrencies, and common implementation mistakes
- Cryptocurrency Class 2022 - Patrick McCorry - University course covering Bitcoin, Ethereum, payment channels, and layer-2 scaling with practical assignments
- Principles of Blockchains - Pramod Viswanath - Illinois ECE course formalizing blockchain scalability, consensus protocols, and the data-consensus-execution framework
- Blockchain And Money - Gary Gensler - MIT Sloan course examining blockchain through the lens of finance, regulation, and use cases beyond cryptocurrency
- Decentralized Finance MOOC - Dan Boneh, Arthur Gervais, Andrew Miller, Christine Parlour and Dawn Song - Multi-university course covering DeFi mechanics, AMMs, lending, stablecoins, and protocol security
- Stanford CS 251 Blockchain Technologies - Dan Boneh - Stanford course covering consensus, smart contracts, DeFi, and privacy from a computer science perspective
- Stanford EE374 Blockchain Foundations - David Tse, Dionysis Zindros - Stanford course focusing on the theoretical foundations of consensus protocols, longest-chain analysis, and PoS security
- ECE595 Foundations of Blockchain Systems - Sreeram Kannan - UW course on blockchain systems theory covering consensus, sharding, data availability, and restaking
- CS598CAL Consensus Algorithms - Ling Ren - Illinois graduate seminar on consensus algorithms covering Paxos, PBFT, HotStuff, and DAG-based protocols
- Dan Boneh's Online Cryptography Course - Stanford - Stanford's free online course covering symmetric encryption, public-key crypto, and authenticated encryption from first principles
Missing topics
Not yet reviewed
These resources were recently found and have not been reviewed yet.
ZK Proofs: New Proving Systems
ZK Proofs: Folding Schemes
MEV (New)
Scaling & Data Availability
Consensus (New)
FHE
ZK Proving Systems (New)
Ethereum: Pectra & Account Abstraction (New)
MEV / PBS (New)
Bitcoin: BitVM & OP_CAT (New)
Consensus Protocols (New)
Post-Quantum (New)
Cross-Chain (New)