AES Cipher
1. AES at a Glance (FIPS-197, Rijndael)
128-bit blocks as byte state, key 128/192/256 bits → 10/12/14 rounds. Unlike DES (Feistel), AES is an SPN: every layer must invert, encryption ≠ decryption circuit (uses InvSubBytes/InvShiftRows/InvMixColumns). Round structure:
AddRoundKey(K0) [pre-whitening]
9/11/13 × {SubBytes → ShiftRows → MixColumns → AddRoundKey}
Final: SubBytes → ShiftRows → AddRoundKey [no MixColumns]
Decrypt runs inverse steps with reversed (inverse-transformed for EquivInverse) round keys.
2. The Four Transformations (Each with Worked Bite)
| Step | What it does | Worked bite |
|---|---|---|
| SubBytes (confusion) | Each byte : inverse () + affine transform | (standard table check); 1 input bit flips output bits (nonlinear) |
| ShiftRows (diffusion) | Row cyclic-left by : | State row 1 ; row 0 unchanged — spreads columns across rows |
| MixColumns (diffusion) | Each column fixed matrix over mod : rows | -style mix: 1 input byte changes all 4 output bytes (branch number 5) |
| AddRoundKey | State 128-bit round key | Only key-mixing step; involution (own inverse); pre/post whitening blocks key-guessing ends |
Wide Trail: SubBytes (active S-boxes) × MixColumns (branch 5) guarantees active S-boxes per 4 rounds → differential/linear bounds .
3. Key Expansion (Worked Logic)
128-bit key → 11 round keys (1408 bits) via 4-word columns: where = RotWord → SubWord → Rcon ( in : 01, 02, 04, 08, ...), plain XOR for other words. 192/256-bit variants differ only in rhythm (8-word with extra SubWord for 256). Numerical habit: given , — exams test one-word derivation, not all 44.
4. Decryption and Implementation Notes
- EquivInverseCipher: moved through with transformed keys — same round shape as encryption (HW reuse).
- S-box tables: 256-byte forward + inverse (or compute inverse + affine on the fly); T-table implementations fuse Sub+ Shift+Mix (fast, cache-timing vulnerable → AES-NI/masked).
- Test vector anchor: AES-128 key
00..00, plaintext00..00→ ciphertext66e94bd4ef8a2c3b884cfa59ca342b2e2— quote to prove standard compliance.
5. AES vs DES (Exam Table)
| Point | DES | AES |
|---|---|---|
| Block / key | 64 / 56 | 128 / 128, 192, 256 |
| Structure | Feistel (F needn't invert) | SPN (all layers invert) |
| Rounds | 16 | 10 / 12 / 14 |
| Nonlinearity | 8 × S-boxes (secret criteria) | 1 × S-box ( inverse + affine, public) |
| Diffusion | E + P-box | ShiftRows + MixColumns (branch 5) |
| Status | Broken (brute force) | Secure (only side-channel/related-key certificational) |
Exam Points
- State diagram + round pseudocode with pre-whitening and no-MixColumns final — 5-mark diagram core.
- Four steps with one worked bite each (, ShiftRows shift counts, MixColumns branch 5, AddRoundKey XOR) — favourite 5-marker.
- Key-expansion formula + Rcon sequence + one-word numerical.
- AES-vs-DES table; wide-trail bound line.