During AES algorithm processing, a 4 x 4 array of bytes known as the state is modified using multiple rounds. Full encryption requires 10 to 14 rounds, depending on the size of the key. The following table shows the key sizes and the required number of rounds:
Key size |
Number of rounds required |
128-bit |
10 rounds |
192-bit |
12 rounds |
256-bit |
14 rounds |
Once the state is initialized with the input to the cipher, four operations are performed in four stages to encrypt the input. These stages are: AddRoundKey, SubBytes, ShiftRows, and MixColumns:
- In the AddRoundKey step, the state array is XOR'd with a subkey, which is derived from the master key
- SubBytes is the substitution step where a lookup table (S-box) ...