Computer Science

The Joy of Cryptography

Mike Rosulek

An open cryptography textbook teaching precise security definitions and hybrid proofs through pseudocode, examples and extensive exercises.

Prerequisites

Discrete probability, elementary combinatorics, modular arithmetic and proof reading are important. Understand pseudocode, scope, arrays and subroutine calls. The mathematical review supports revision rather than replacing an initial discrete mathematics course.

Edition
Current MIT Press online edition
Difficulty Level
Intermediate
Academic Level
Undergraduate
provable securitysecurity gamescryptography

01 / Reading Guide

Reading Guide

Who this book is for

For upper-level undergraduate students taking a first rigorous cryptography course. The challenge is conceptual precision rather than extensive calculus: readers must keep the adversary’s capabilities, the security experiment and the claimed guarantee aligned. The preface explicitly develops expectations for students with prior discrete mathematics and programming.

Prerequisites

Discrete probability, elementary combinatorics, modular arithmetic and proof reading are important. Understand pseudocode, scope, arrays and subroutine calls. The mathematical review supports revision rather than replacing an initial discrete mathematics course.

What it covers

One-time pads and secret sharing lead to pseudorandom generators, functions and permutations, symmetric encryption, hashing, key exchange and signatures. Later chapters develop messaging, authentication, zero knowledge and post-quantum topics. Security is expressed through games and small transformations between programs rather than inferred from sample ciphertexts.

How to use it

Write down the interface visible to an adversary before beginning a proof. For every hybrid step, identify the exact line of pseudocode changed and the assumption or equivalence that permits it. Try constructing a distinguisher for an insecure variation before studying the corrected design. Compare an intuitive argument with the formal experiment and explain any missing quantifier or probability bound. Use exercises and animations to check the proof structure; a successful toy implementation alone does not prove security.

Edition and sources

The complete current online edition is an authorized MIT Press edition under CC BY-NC-ND 4.0. It should be distinguished from earlier circulating drafts. Noncommercial redistribution must preserve attribution, and the license does not permit distribution of modified versions. No print date or format identifier is inferred here.

Open the official resource