2082 1

CSC327 ยท 2082

Feistel Cipher Structure and AES Key Expansion

Feistel Cipher Structure and AES Key Expansion

CryptographyChapter 2: Symmetric CiphersFiestel Cipher StructureNumerical: AES key expansion

Feistel Cipher Structure and AES Key Expansion

Part A: Feistel Cipher Structure

A Feistel Cipher is a symmetric block cipher design that splits a plaintext block into two equal halves and processes them through several rounds of substitution and permutation using round sub-keys derived from the master key.

Working

A block of $2w$ bits is divided into $L_0$ (left) and $R_0$ (right).

For each round $i$:

$$L_i = R_{i-1}$$ $$R_i = L_{i-1} \oplus F(R_{i-1}, K_i)$$

where $K_i$ is the round sub-key and $F$ is the round function (which need not be invertible).

Block Diagram (words)

  • Split plaintext into $L_0$ and $R_0$.
  • Feed $R_0$ and $K_1$ into $F$.
  • XOR $F$ output with $L_0 \Rightarrow R_1$.
  • $R_0$ becomes $L_1$ (swap).
  • Repeat for $n$ rounds; recombine $L_n, R_n$ into ciphertext.

Key Properties

  • Same structure for encryption and decryption (sub-keys reversed for decryption).
  • $F$ need not be invertible.
  • Security grows with more rounds.
  • Examples: DES (16 rounds), Blowfish, Camellia.

Part B: AES Key Expansion - First 4 Bytes After First Iteration

Given Data

Key (16 bytes) grouped into 4 words:

WordBytes
$W_0$2B 7E 15 16
$W_1$28 AE D2 A6
$W_2$AB F7 97 66
$W_3$01 02 03 04

S-Box row 0 provided (sufficient, since all bytes being substituted have upper nibble 0).

Formula

$$W_4 = W_0 \oplus g(W_3)$$

Step 1: RotWord of $W_3 = [01,02,03,04]$: $$[02,\ 03,\ 04,\ 01]$$

Step 2: SubBytes (row 0 of S-Box):

ByteS-Box
02 โ†’ col 277
03 โ†’ col 37B
04 โ†’ col 4F2
01 โ†’ col 17C

$$[77,\ 7B,\ F2,\ 7C]$$

Step 3: XOR Rcon(1) = [01,00,00,00]: $$[77\oplus01,\ 7B,\ F2,\ 7C] = [76,\ 7B,\ F2,\ 7C]$$

So $g(W_3) = [76, 7B, F2, 7C]$.

Step 4: Compute $W_4 = W_0 \oplus g(W_3)$:

$W_0$$g(W_3)$XOR
2B765D
7E7B05
15F2E7
167C6A

Verification of first byte: $2B = 0010,1011$, $76 = 0111,0110$, XOR $= 0101,1101 = 5D$. โœ“

Final Answer

$$\boxed{W_4 = [5D,\ 05,\ E7,\ 6A]}$$

The first 4 bytes of the next key after the first iteration are 5D 05 E7 6A.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.