Define: • as the length of the key in 32-bit words: 4 words for AES-128, 6 words for AES-192, and 8 words for AES-256 • , , ... as the 32-bit words of the original key • as the number of round keys needed: 11 round keys for AES-128, 13 keys for AES-192, and 15 keys for AES-256 • , , ... as the 32-bit words of the expanded key Also define as a one-byte
left circular shift: :\operatorname{RotWord}(\begin{bmatrix} b_0 & b_1 & b_2 & b_3 \end{bmatrix}) = \begin{bmatrix} b_1 & b_2 & b_3 & b_0 \end{bmatrix} and as an application of the
AES S-box to each of the four bytes of the word: :\operatorname{SubWord}(\begin{bmatrix} b_0 & b_1 & b_2 & b_3 \end{bmatrix}) = \begin{bmatrix} \operatorname{S}(b_0) & \operatorname{S}(b_1) & \operatorname{S}(b_2) & \operatorname{S}(b_3) \end{bmatrix} Then for i = 0 \ldots 4R-1: :W_i = \begin{cases} K_i & \text{if } i 6 \text{, and } i \equiv 4 \pmod{N} \\ W_{i-N} \oplus W_{i-1} & \text{otherwise.} \\ \end{cases} == Notes ==