Start here¶
A book in 23 chapters, from a shift cipher you can do in your head to lattices and zero-knowledge proofs. Each chapter starts from a problem, teaches the math it needs on the spot, builds the answer by hand, codes it, breaks it, and ends with exercises.
How the book works¶
- Read in order. Each chapter assumes only the ones before it. The Previous / Next links at the bottom of every page walk you through.
- Every chapter opens with a box saying what you'll learn, which chapters you need first, and which sections are beginner, intermediate or expert.
- Levels inside a chapter. The first sections need nothing but the earlier chapters. Sections marked Level: intermediate or Level: expert go further; skip them on a first read and come back later.
- Do the exercises. They run from easy to hard. Each answer is folded under the question; try first, then open it.
- Run the code. Every example is short Python 3.8 or later, using only the standard library unless it says otherwise. These are toy versions to show the math, never to protect real data.
- The other tabs are the reference. Algorithms has one page per algorithm with sizes, standards, status and closed "Going deeper" boxes; Protocols covers protocols, formats and tools; History tells the whole story. The chapters link to them.
Contents¶
Look things up: the algorithm table with every algorithm's size, standard, year and status; the algorithm reference, one page per algorithm; the protocols, formats and tools; the full world history of cryptography; the glossary; and the FAQ.
Three ways in¶
- New to all of it? Start at Chapter 1 and read straight through Part I. You need school arithmetic and nothing else.
- You program but never studied cryptography? Skim Chapters 1 and 2, read Chapter 3 carefully, then go on in order.
- You know the basics? Jump to Part IV and open every Level: expert section on the way back through the book.