A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

Security Definitions for Encryption: Indistinguishability, CPA, and CCA

Graduate Depth 110 in the knowledge graph ☐ I know this ☆ Set as goal
552prerequisites beneath it
See this on the map →
Perfect Secrecy and the One-Time PadSymmetric Encryption and Block Ciphers+1 more→
provable-security indistinguishability IND-CPA IND-CCA security-games negligible-functions malleability

Core Idea

Modern cryptography defines security precisely, as a game between a challenger and an efficient adversary. In the indistinguishability game, the adversary picks two messages of equal length, receives the encryption of one chosen at random, and must guess which one it was. A scheme is secure if no efficient adversary guesses correctly with probability noticeably better than 1/2. The definitions differ in what the adversary may do: an eavesdropper only sees the challenge, a chosen-plaintext attacker (CPA) can also obtain encryptions of messages of its choice, and a chosen-ciphertext attacker (CCA) can also obtain decryptions of ciphertexts other than the challenge.

How It's Best Learned

Follow the presentation in Katz and Lindell's *Introduction to Modern Cryptography*: write each game out step by step, then break simple schemes against it. Show that any deterministic scheme fails CPA security with a single oracle query, and that a malleable scheme such as counter mode fails CCA security by flipping one bit. Map each definition to a realistic threat, such as an attacker who can get a server to encrypt chosen data, or one who can observe how a server reacts to tampered ciphertexts.

Common Misconceptions

Explainer

Perfect secrecy, achieved by the one-time pad, demands that a ciphertext reveal nothing about the message even to an attacker with unlimited computing power. Shannon showed this requires a key at least as long as the message, which is impractical. Modern cryptography relaxes the goal in two ways. It considers only efficient adversaries, those running in time polynomial in a security parameter n. And it allows them a negligible chance of success beyond guessing, a probability that shrinks faster than any inverse polynomial in n.

The goal is then written as a game. In the basic indistinguishability experiment, a key k is generated. The adversary chooses two messages m0 and m1 of the same length. The challenger flips a fair coin b, encrypts m_b, and hands back the challenge ciphertext c*. The adversary outputs a guess b'. The scheme is secure if every efficient adversary has Pr[b' = b] ≤ 1/2 + negl(n). This captures a strong intuition. If an attacker cannot even tell which of two messages of its own choosing was encrypted, it cannot learn any partial information about real messages. Goldwasser and Micali formalized this idea, along with the equivalent notion of semantic security, in the early 1980s.

The basic game models a passive eavesdropper. Chosen-plaintext attack (CPA) security gives the adversary an encryption oracle: it may ask for encryptions of any messages, before and after seeing c*. This models attackers who can influence what gets encrypted. One consequence surprises many students: no deterministic scheme can be CPA-secure. The adversary simply asks for the encryption of m0 and compares. CPA-secure schemes must be randomized, which is why modes such as CBC and CTR use a fresh random IV or nonce for each message.

Chosen-ciphertext attack (CCA) security also gives the adversary a decryption oracle, usable on any ciphertext except c* itself. This models attackers who can send modified ciphertexts to a server and observe the results. Real attacks fit this model. Padding-oracle attacks, described by Serge Vaudenay in 2002, recover plaintexts from CBC encryption by learning whether the server reports a padding error. Malleable schemes such as CTR mode fail CCA security outright, since flipping a ciphertext bit flips the matching plaintext bit.

Achieving CCA security in practice usually means authenticated encryption. Encrypting with a CPA-secure scheme and then applying a strongly secure MAC to the ciphertext (encrypt-then-MAC) yields a CCA-secure scheme. Tampered ciphertexts are rejected before decryption, so the decryption oracle gives the attacker nothing useful.

Practice Questions 4 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Regular Language Recognition Algorithms → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Time Complexity Classes: P and EXPTIME → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Hash Functions and Collision Resistance → The RSA Cryptosystem → Computational Hardness Assumptions → One-Way Functions → Pseudorandom Generators → Pseudorandom Functions → Security Definitions for Encryption: Indistinguishability, CPA, and CCA

Longest path: 111 steps · 552 total prerequisite topics

Prerequisites (3)

Leads To (0)

No topics depend on this one yet.