Watch AES-128 encrypt data through 10 rounds of SubBytes, ShiftRows, MixColumns, and AddRoundKey transformations on a 4x4 state matrix.
AES (Advanced Encryption Standard) is a symmetric block cipher that operates on 128-bit blocks.
AES-128 uses a 128-bit key and performs 10 rounds of transformation on a 4x4 byte state matrix.
Each round applies four operations to achieve confusion (SubBytes, AddRoundKey) and diffusion (ShiftRows, MixColumns).
AES operates in the Galois field GF(2^8) with the irreducible polynomial:
MixColumns uses multiplication by 2 and 3 in this field. Multiplication by 2 is a left shift with conditional XOR by 0x1B if the MSB was set.
This field arithmetic ensures every operation is invertible, which is essential for decryption.
Each byte in the state is replaced by its corresponding value in the S-Box lookup table. The S-Box is derived from the multiplicative inverse in GF(2^8) followed by an affine transformation.
Each row of the state is cyclically shifted to the left by a different offset. Row 0 stays, Row 1 shifts by 1, Row 2 by 2, Row 3 by 3 positions.
Each column is multiplied by a fixed polynomial matrix in GF(2^8). This mixes all four bytes within each column together.
Each byte of the state is XORed with the corresponding byte of the round key. This is the only operation that incorporates the secret key material.
| Variant | Key Size | Block Size | Rounds | Security Level |
|---|---|---|---|---|
| AES-128current | 128 bits | 128 bits | 10 | 128-bit |
| AES-192 | 192 bits | 128 bits | 12 | 192-bit |
| AES-256 | 256 bits | 128 bits | 14 | 256-bit |