AES key schedule


uses a key schedule to expand a short key into a number of separate round keys. The three AES variants have a different number of rounds. Each variant requires a separate 128-bit round key for each round plus one more. The key schedule produces the needed round keys from the initial key.

Round constants

The round constant for round of the key expansion is the 32-bit word:
where is an eight-bit value defined as:
where is the bitwise XOR operator and constants such as and are given in hexadecimal. Equivalently:
where the bits of are treated as the coefficients of an element of the finite field, so that e.g. represents the polynomial.
AES uses up to for AES-128, up to for AES-192, and up to for AES-256.

The key schedule

Define:
Also define as a one-byte left circular shift:
and as an application of the AES S-box to each of the four bytes of the word:
Then for :