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

Symmetric Encryption and Block Ciphers

Graduate Depth 88 in the knowledge graph ☐ I know this ☆ Set as goal
34topics build on this
384prerequisites beneath it
See this on the map →
Modular Arithmetic and CongruencesPerfect Secrecy and the One-Time Pad→→Diffie-Hellman Key ExchangeGarbled Circuits+6 more
block-cipher aes feistel-network confusion-diffusion symmetric-key

Core Idea

Block ciphers are deterministic algorithms that encrypt fixed-size blocks of plaintext under a secret key, forming the workhorse of symmetric cryptography. AES (the current standard) processes 128-bit blocks using substitution-permutation networks that achieve Shannon's confusion (complex key-ciphertext relationship) and diffusion (spreading plaintext influence across the ciphertext). A block cipher is a keyed pseudorandom permutation: with a random key, it should be indistinguishable from a truly random permutation of the block space. Security relies on computational hardness, not information-theoretic impossibility.

How It's Best Learned

Build a toy 16-bit cipher on paper: a 4-bit S-box applied to four nibbles, a bit permutation, and a key XOR, repeated for a few rounds. Flip one plaintext bit and track how many output bits change after each round to see diffusion grow. Then build a two-round Feistel cipher with a non-invertible round function and decrypt it, to see why Feistel designs do not need invertible rounds.

Common Misconceptions

Explainer

Since Shannon proved that perfect secrecy requires impractically long keys, modern symmetric cryptography pursues the next best thing: ciphers that are computationally indistinguishable from ideal. A block cipher takes a fixed-length plaintext block (128 bits for AES) and a secret key, and produces a ciphertext block of the same length. For each key, the cipher defines a permutation (bijection) on the block space — every plaintext maps to a unique ciphertext and vice versa, enabling decryption. The security goal is that a block cipher under a random key should look like a pseudorandom permutation (PRP): no efficient algorithm should be able to distinguish it from a truly random permutation of the block space.

The two dominant design paradigms are Feistel networks and substitution-permutation networks (SPNs). DES, the former standard, uses a Feistel structure: the block is split in half, and each round applies a keyed round function to one half and XORs the result into the other. The elegant property is that the round function need not be invertible — decryption simply runs the rounds backward. AES, the current standard, uses an SPN: each round applies substitution (S-boxes that replace bytes nonlinearly), row shifting, column mixing, and key addition to the entire block. Every operation must be invertible. AES processes 128-bit blocks through 10, 12, or 14 rounds depending on the key size (128, 192, or 256 bits).

Both designs implement Shannon's principles of confusion and diffusion. Confusion makes the relationship between the key and the ciphertext as complex as possible — each ciphertext bit should depend on many key bits in a highly nonlinear way. AES achieves this through its S-box, a carefully chosen nonlinear byte substitution. Diffusion ensures that each plaintext bit influences many ciphertext bits — changing one input bit should flip roughly half the output bits (the "avalanche effect"). AES achieves this through ShiftRows and MixColumns, which spread byte-level changes across the entire block within two rounds.

It is important to distinguish the block cipher primitive from a complete encryption scheme. A raw block cipher encrypts exactly one block deterministically — the same plaintext and key always produce the same ciphertext. Encrypting a multi-block message or achieving security against chosen-plaintext attacks requires a mode of operation (CBC, CTR, GCM, etc.) that introduces randomness or state. The block cipher is the building block; the mode of operation turns it into a full encryption system. Understanding this separation is essential because a perfectly secure block cipher used in a flawed mode can be completely insecure.

Practice Questions 5 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 → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Euclidean Algorithm → Modular Arithmetic and Congruences → Classical Ciphers and Cryptanalysis → Perfect Secrecy and the One-Time Pad → Symmetric Encryption and Block Ciphers

Longest path: 89 steps · 384 total prerequisite topics

Prerequisites (2)

Leads To (8)