Break AES, one missing step at a time

Security I, Fall 2026. A coding challenge that goes with the AES lecture.

We break four weak versions of AES-128. Each weak version removes one of the four steps from every round. For each one we get some ciphertexts, and we must recover a secret plaintext without the key.

The code we use

Download aes.py. It is the AES from the lecture, for one 16-byte block, in plain Python. We do not need to write AES ourselves.

Run python3 aes.py once. It prints these values, for key 00 01 02 ... 0f and plaintext 00 11 22 ... ff:

skip          ciphertext
none          69c4e0d86a7b0430d8cdb78070b4c55a   (FIPS-197, appendix C.1)
SubBytes      b60c4e707d338ca91e252895a5914de4
ShiftRows     5300bda29c7e35fbca37eb5f48c9fbef
MixColumns    5cec2b6ff8595c257f0cc5620b901e90
AddRoundKey   8c34c7e2358383edd3da9b3d23cca3b3

The four challenges

Each challenge uses its own secret random key, which we never see. Each secret plaintext is 16 ASCII characters of the form flag{...}. Each page can check our answer.

ChallengeStep removedWhat we get
1SubBytesOne known pair, one target ciphertext
2ShiftRowsA log of eight known pairs, one target ciphertext
3MixColumnsOne known pair, 256 chosen plaintexts, one target ciphertext
4AddRoundKeyOne known pair, one target ciphertext

Rules