Back in the café. Your phone sends Tk 5,000 to a friend, and the stranger at the next table records every packet. In the last lesson we met the only cipher that is perfect, the one-time pad, and saw why no bank can use it: its key must be as long as the message and must never be used twice. Your phone cannot carry a fresh random key for every payment. It has a key of 128 bits, which is 16 bytes. Sixteen bytes of key somehow scramble megabytes of data so well that a recorded message is useless to everyone who lacks those 16 bytes.
How is that possible? That is the question of this lesson, and the answer is the cipher your phone is running: AES. It has a history. Its grandfather, DES, was the world's standard for nearly thirty years, until a machine built for less than a quarter of a million dollars broke it in a few days. Its stopgap successor, triple DES, is now retired. And around all of them sit the modes of operation, the rules that let a cipher which locks 16 bytes at a time lock a whole file without leaking a pattern.
By the end you will be able to count how many keys a group needs and say why that is a problem. You will separate block ciphers from stream ciphers, and say what confusion, diffusion and a Feistel round are.
You will list the numbers of DES (block, key, rounds, round key), follow one real DES round, explain why DES fell, how double DES falls to a meet-in-the-middle attack, and what triple DES is.
You will describe AES round by round, with the real numbers of one round, and compare it with IDEA, Blowfish, RC4 and ChaCha20. And for ECB, CBC, CTR and GCM you will say which one leaks, which one needs an IV, and which one notices tampering. Every number in this lesson was computed by a program, and the DES and AES programs were checked against published test vectors.