What are the four operations in each AES round?
SubBytes (substitution), ShiftRows (row shifting), MixColumns (column mixing), and AddRoundKey (XOR with round key).
* The four steps of one AES round — SubBytes (confusion), ShiftRows and MixColumns (diffusion), AddRoundKey. *
Read together, the four steps are a deliberate confusion-then-diffusion sandwich: SubBytes injects non-linearity, ShiftRows and MixColumns spread that non-linearity across the whole block, and AddRoundKey binds the result to the secret key. Repeated for 10–14 rounds, this makes every output bit depend on every input and key bit.
1. SubBytes — Confusion
- Each byte is replaced using a fixed 8-bit S-box (lookup table)
- Provides non-linearity — this is the key source of confusion
- The S-box is based on multiplicative inverse in GF(2^8)
2. ShiftRows — Diffusion
- Row 0: no shift
- Row 1: shift left by 1 byte
- Row 2: shift left by 2 bytes
- Row 3: shift left by 3 bytes
- Ensures bytes from different columns get mixed in MixColumns
3. MixColumns — Diffusion
- Each column is multiplied by a fixed matrix in GF(2^8)
- Each output byte depends on all 4 input bytes of the column
- Not applied in the final round
4. AddRoundKey
- XOR the state with the round key (derived from the main key via key schedule)
- This is where the secret key enters the computation
Tip: SubBytes provides confusion (S-boxes), while ShiftRows + MixColumns together provide diffusion.
Go deeper:
Advanced Encryption Standard (Wikipedia) — each round step and how the S-box is built in GF(2⁸).