Lecture 2 · Friday 26 September 2025

AES (Advanced Encryption Standard) and modes

The second lecture replaces the one-time pad with a computational object. AES supplies a keyed permutation on 128-bit blocks, the modes turn that permutation into a channel for long messages and the Indistinguishability under Chosen-Plaintext Attack (IND-CPA) game states what security means when the eavesdropper, Eve, can choose plaintexts.

Deck: 01_Crypto_101_Sym.pdf Chapter 1

Before ThisWhere Lecture 1 Left Off

Lecture 1 proved that perfect secrecy exists and is expensive: Shannon's bound requires a key at least as long as the message, and the one-time pad achieves the bound with one fresh pad per message. The two-time pad lab showed the consequence of reuse: the key cancels out of two ciphertexts and leaves the XOR of the two plaintexts. The escape is computational security, where a short key encrypts many messages and the adversary is bounded to polynomial time.

This LectureWhat It Adds

Three things. First, AES (Advanced Encryption Standard): the state matrix, the four round steps, the Substitution Box (S-box) derived from the field inverse in $\GF(2^8)$ (the finite field with 256 elements) and the key schedule. The stage on the chapter page steps through one full round on the FIPS-197 (Federal Information Processing Standard 197) test vector, and the S-box lab derives one table entry live. Second, the modes of operation: Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB) and Counter (CTR), with the equality leak of ECB made visible by the pixel-grid lab and the freshness requirement of every Initialization Vector (IV) or nonce. Third, Indistinguishability under Chosen-Plaintext Attack (IND-CPA): the chosen-plaintext game, the one-query attack on deterministic encryption and the conditions under which CBC and CTR satisfy the definition.

Study PlanWhat to Read, in Lecture Order

  1. Chapter 1 §4: AES (Advanced Encryption Standard): the standard block cipher. The round structure, the Substitution Box (S-box) derivation and the key schedule. Run the stage and the S-box lab; the exercise below asks for one S-box entry by hand.
  2. §5: Modes of operation. Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB) and Counter (CTR), with the stage contrasting CBC chaining and CTR parallelism. The ECB lab encrypts a smiley under both modes and counts equal ciphertext pairs.
  3. §6: Chosen-plaintext security. The Indistinguishability under Chosen-Plaintext Attack (IND-CPA) game, the deterministic-encryption attack and the Initialization Vector (IV) and nonce discipline the secure modes require.

PracticeExercises for This Lecture