The AES key schedule is an algorithm for deriving 128-bit round keys from a master key. The number of rounds depends on the key size used.

The key undergoes a couple steps to produce a round key:

  • Treating the key as a column-major 2D array. For 128-bit key size, we would have a matrix.
  • Rotate the key: transposition cipher
  • Each byte runs through an S-box: substitution cipher
  • XOR each column with the round constant, then with the previous round key.