The Advanced Encryption Standard 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.[note 1] The key schedule produces the needed round keys from the initial key.
and SubWord as an application of the AES S-box to each of the four bytes of the word:
Then for :
Notes
↑ Non-AES Rijndael variants require up to 256 bits of expanded key per round
↑ In FIPS-197 the value is the least significant byte at index 0
↑ The Rijndael variants with larger block sizes use more of these constants, up to rcon29 for Rijndael with 128-bit keys and 256 bit blocks (needs 15 round keys of each 256 bit, which means 30 full rounds of key expansion, which means 29 calls to the key schedule core using the round constants). The remaining constants for i≥ 11 are: 6C, D8, AB, 4D, 9A, 2F, 5E, BC, 63, C6, 97, 35, 6A, D4, B3, 7D, FA, EF and C5
↑ Other Rijndael variants require max(N, B) + 7 round keys, where B is the block size in words
↑ Other Rijndael variants require BR words of expanded key, where B is the block size in words
↑ Rotation is opposite of byte order direction. FIPS-197 byte addresses in arrays are increasing from left to right[ref 1] in little endian but rotation is from right to left. In AES-NI[ref 2] and in the Linux kernel's lib/crypto/aes.c[ref 3], the byte ordering is increasing from right to left in little endian but rotation is from left to right.
This page is based on this Wikipedia article Text is available under the CC BY-SA 4.0 license; additional terms may apply. Images, videos and audio are available under their respective licenses.