MathematicsThe Joy of Cryptography
Not rated yetRate this bookMike Rosulek’s The Joy of Cryptography develops cryptographic reasoning through precise security definitions, pseudocode libraries, and proofs that compare what an adversary can observe. This guide follows the linked draft dated February 6, 2020, including Chapter 0 and Chapters 1–15. The emphasis is on understanding guarantees and composing primitives correctly. It is a theoretical undergraduate text requiring discrete mathematics, probability, algorithms, and proof skills; it does not teach production-ready cryptographic implementation.
Free reading is available at the official source. Opens in a new tab.
FreeAbout this book
Mike Rosulek’s The Joy of Cryptography develops cryptographic reasoning through precise security definitions, pseudocode libraries, and proofs that compare what an adversary can observe. This guide follows the linked draft dated February 6, 2020, including Chapter 0 and Chapters 1–15. The emphasis is on understanding guarantees and composing primitives correctly. It is a theoretical undergraduate text requiring discrete mathematics, probability, algorithms, and proof skills; it does not teach production-ready cryptographic implementation.
Book summary
Mike Rosulek’s The Joy of Cryptography develops cryptographic reasoning through precise security definitions, pseudocode libraries, and proofs that compare what an adversary can observe. This guide follows the linked draft dated February 6, 2020, including Chapter 0 and Chapters 1–15. The emphasis is on understanding guarantees and composing primitives correctly. It is a theoretical undergraduate text requiring discrete mathematics, probability, algorithms, and proof skills; it does not teach production-ready cryptographic implementation.
Chapter-by-chapter summaries
Chapter 0 — Review of Concepts and Notation
The mathematical review establishes the language used throughout the proofs: exponents, logarithms, modular arithmetic, strings, functions, probability, pseudocode, and asymptotic notation. Small notational distinctions matter, especially the difference between congruence and an operation returning a remainder. Work through examples until you can explain the sample space and probability of a simple event without relying on intuition alone. Maintain a reference sheet of symbols and their types. Later proof difficulties often arise from uncertainty about these basic objects rather than from the cryptographic idea itself.
Chapter 1 — One-Time Pad and Kerckhoffs’ Principle
The one-time pad gives a concrete starting point for separating a public algorithm from its secret key. Its confidentiality depends on precise conditions, including a uniformly random key of suitable length used only once. Kerckhoffs’ principle places the security burden on the key rather than secrecy about the system’s design. Follow the chapter’s reasoning about what a ciphertext reveals and compare it with informal claims that a message merely looks scrambled. Explain why a mathematically strong guarantee can impose demanding practical requirements for key distribution and use.
Chapter 2 — The Basics of Provable Security
Security definitions are expressed as libraries sharing an interface but differing internally. An adversary is a calling program whose observations and permitted actions are explicitly defined. This framework supports both demonstrating insecurity and proving security through hybrid arguments. For each definition, identify the hidden information, allowed queries, outputs, and success criterion. When studying a proof, explain why each transition preserves or only negligibly changes the adversary’s view. A convincing argument must connect the construction to a stated assumption; naming a strong primitive is not enough.
Chapter 3 — Secret Sharing
Secret sharing distributes information so authorized groups can reconstruct a secret while unauthorized groups learn nothing under the stated definition. The chapter moves from a simple two-share construction to polynomial interpolation and Shamir’s threshold scheme, with an additional visual example. Distinguish reconstruction correctness from secrecy: satisfying one does not automatically satisfy the other. Use a small mathematical example to understand interpolation, then explain why insufficient shares leave the secret undetermined in the required probabilistic sense. Compare threshold access with simply dividing a file into ordinary pieces.
Chapter 4 — Intractable Computations
The text shifts from unconditional security to computational security, defining feasible adversaries and negligible probabilities as functions of a security parameter. Indistinguishability captures the idea that efficient observers cannot reliably tell two situations apart. Birthday probabilities demonstrate why collisions can become significant earlier than a naive estimate suggests. Practice stating exactly which quantity grows and which probability is bounded. Avoid interpreting computationally infeasible as a timeless absolute: the model, assumptions, parameters, and adversary capabilities all belong to the claim being made.
Chapter 5 — Pseudorandom Generators
A pseudorandom generator deterministically expands a short random seed into a longer string whose distribution is computationally indistinguishable from uniform for efficient observers. This is a different guarantee from producing truly independent randomness. The chapter connects generators with encryption, stretch extension, and optional applications involving stream ciphers and ratcheting. Track the distinction between a mathematical construction and its security argument. For every proposed modification, ask whether a distinguisher would gain information and how a reduction would turn that advantage into a violation of the original generator assumption.
Chapter 6 — Pseudorandom Functions and Block Ciphers
Pseudorandom functions provide consistent keyed behavior across inputs while remaining indistinguishable from a random function within the model. Block ciphers are keyed permutations, so invertibility introduces a structural distinction. The chapter relates these concepts and develops proofs involving multiple queries and variable hybrids. Build a comparison table for generators, functions, and permutations: input, output, key, consistency, and permitted oracle access. This prevents the common mistake of treating all pseudorandom objects as interchangeable because their outputs appear random in isolation.
Chapter 7 — Security Against Chosen-Plaintext Attacks
Chosen-plaintext security models an observer who can obtain encryptions of messages it selects. Deterministic encryption exposes repeatable relationships and cannot meet the chapter’s general confidentiality goal in this setting. The text develops stronger definitions and constructions based on pseudorandom functions. Write out what information is public, what randomness is sampled, and what an encryption query returns. Compare single-message secrecy with repeated use of one key. The central lesson is that a security claim must model the interactions a system actually permits.
Chapter 8 — Block Cipher Modes of Operation
Modes of operation extend fixed-size block primitives to useful encryption of longer messages. Their treatment of state, initialization, message length, and padding affects the resulting guarantee. The chapter surveys modes, analyzes OFB security, and discusses padding and ciphertext stealing. Diagram the data flow of the source examples and annotate the assumptions used in each argument. Distinguish a secure block cipher from a secure encryption scheme built around it. A familiar primitive does not rescue a mode that exposes structure or violates its usage requirements.
Chapter 9 — Chosen-Ciphertext Attacks
Chosen-ciphertext security accounts for more powerful interaction, including access to decryption behavior subject to the model’s restrictions. The padding-oracle discussion illustrates how system responses can reveal information even when the underlying cipher remains intact. Study the failure conceptually by identifying what the interface leaks and which earlier definition failed to capture it. Then compare the CCA security experiment with the CPA experiment. The important outcome is understanding why resistance to passive observation or chosen plaintexts does not automatically protect against active manipulation.
Chapter 10 — Message Authentication Codes
A MAC uses a shared secret to support verification of message authenticity and integrity. Its security goal is unforgeability, not confidentiality, and verification rules are part of the scheme. The chapter connects MACs with pseudorandom functions, longer messages, and encrypt-then-MAC composition. Identify what counts as a successful forgery and how prior authentication queries are handled. Compare authentication with an unkeyed checksum. When studying composition, list the assumptions and interfaces of both components instead of assuming that combining two secure tools always preserves their guarantees.
Chapter 11 — Hash Functions
Cryptographic hash functions have several distinct properties, including resistance to collisions and to particular preimage tasks. The chapter examines the Merkle–Damgård approach and explains why a hash function is not automatically a MAC. Length-extension behavior provides a concrete reason to distinguish a primitive’s interface from an intended application. Draw a property map showing which claim is required for a given use. Evaluate constructions through the stated security goal rather than the informal expectation that a short digest somehow protects every aspect of a message.
Chapter 12 — Authenticated Encryption and AEAD
Authenticated encryption brings confidentiality and integrity into a coherent security goal. AEAD additionally authenticates associated data that need not be encrypted, making the relationship between protected content and public context explicit. The chapter presents definitions, constructions, Carter–Wegman MAC ideas, and Galois Counter Mode. Track the roles of the key, nonce or initialization input, plaintext, associated data, ciphertext, and rejection output. Explain why authenticated public metadata is different from secret data. The proof obligations and usage conditions remain essential even when a construction offers several protections together.
Chapter 13 — RSA and Digital Signatures
The RSA chapter develops modular inverses and the RSA function before introducing digital signatures, the Chinese remainder theorem, and assumptions associated with factoring. Signatures allow verification with public information, unlike a shared-secret MAC. Separate the underlying number-theoretic function from a complete signature scheme and its security definition. In small arithmetic exercises, check the conditions under which inverses exist rather than applying ordinary division modulo an integer. Explain how correctness, assumed computational difficulty, and unforgeability play different roles in the overall argument.
Chapter 14 — Diffie–Hellman Key Agreement
Diffie–Hellman introduces cyclic groups and a way for parties to derive a shared value from public exchanges and private choices. The decisional Diffie–Hellman assumption supports an indistinguishability-based analysis. Follow which values each party knows and which are visible to an observer. Then distinguish establishing a shared secret from authenticating the other participant; the basic mathematical exchange does not by itself settle identity. Compare the chapter’s assumptions with those used for pseudorandom generators and RSA to see how different constructions rely on different hardness claims.
Chapter 15 — Public-Key Encryption
Public-key encryption separates the key used to encrypt from the secret needed to decrypt. The chapter defines security for this setting, explains why one-time security can imply many-time security in the public-key model, and presents ElGamal and hybrid encryption. Hybrid designs combine public-key and symmetric techniques with complementary roles. Make a diagram of key generation, encryption, decryption, and the adversary’s permitted observations. Compare this setting with earlier symmetric-key definitions so the importance of a publicly available encryption procedure is explicit.
Index of Security Definitions
The final index is a navigation tool for the book’s central achievement: a collection of precise, comparable security experiments. Revisit it after each major group of chapters and reconstruct a definition before looking it up. For every primitive, state its correctness condition, adversary interface, and desired guarantee. A useful final assessment is to select a proposed application and explain which definitions it needs and which it does not obtain merely by using encryption. This turns a long list of primitives into a disciplined method for reasoning.
Study instructions
- Complete the mathematical review before the security proofs; write out small probability and modular-arithmetic examples by hand.
- For each definition, record the adversary’s allowed calls, visible outputs, hidden state, and distinguishing or forgery objective.
- Reconstruct each hybrid proof with a one-sentence justification for every transition, then identify the exact assumption supporting it.
- Keep a primitive comparison sheet covering PRG, PRF, block cipher, encryption, MAC, hash, signature, and key agreement.
- Solve selected exercises before reviewing the text’s argument, and distinguish educational pseudocode from production implementation.
Questions for reflection
- Why does a public encryption algorithm not contradict secrecy?
- What changes when an adversary gains decryption access?
- Why are a collision-resistant hash and a MAC different tools?
- Which guarantees does key agreement provide before authentication is added?
Sources and coverage
This original reading guide follows the linked source edition’s chapter, module, unit, or lesson structure. Consult the source for full arguments, cases, worked examples, exercises, illustrations, and references. Chapter numbering and scope follow the linked February 6, 2020 draft, not a later revision. Read the source edition.
This page provides book information and study material. Full-text access is provided by the original publisher or authorised source; a listing does not grant permission to republish the book.
Read our Library Access & Copyright policyExplore the contents
Check the chapters covered in this edition.
Visit the official source
See reading, preview or purchase options.
Save for later
Keep this textbook in your saved collection.
Reader ratings & reviews
Share your thoughts
Your review helps other students choose the right resources.









