The world's most widely deployed block cipher. Learn the round structure, encrypt blocks live across all three key sizes, and test yourself — everything in one place.
AES is a symmetric block cipher: the same secret key both encrypts and decrypts, and it operates on fixed-size blocks of data. It was selected by NIST in 2001 (originally the Rijndael algorithm by Daemen & Rijmen) to replace the aging DES, and is specified in FIPS PUB 197.
Today AES protects almost everything: TLS connections, disk encryption (BitLocker, FileVault, LUKS), Wi-Fi (WPA2/WPA3), VPNs, and signal-protocol messaging.
A frequent exam trap: AES always uses a 128-bit block. Only the key length varies, which in turn changes the number of rounds.
Rule of thumb: rounds = Nk + 6, where Nk is the number of 32-bit words in the key (4, 6, or 8).
AES doesn't process bytes one at a time. Each 128-bit block is laid out as a 4 × 4 matrix of bytes called the state, filled column-by-column. Every round operation transforms this matrix.
Where Nr = 10, 12 or 14 for AES-128/192/256 respectively.
AES turns the cipher key into a sequence of round keys via the key expansion routine. Each round key is 128 bits (one state-worth). The schedule uses three helpers:
AES-256 additionally applies SubWord to every fourth word, since its key has more material to expand.
| Operation | Acts on | Purpose | Linear? |
|---|---|---|---|
| SubBytes | each byte | non-linearity | no |
| ShiftRows | each row | diffusion across columns | yes |
| MixColumns | each column | diffusion within column | yes |
| AddRoundKey | full state | key mixing (secrecy) | yes |
We'll trace the official NIST test vector through key generation and the first complete round, showing every state matrix in hex.
The 16 plaintext bytes fill the 4 × 4 state matrix column-by-column:
This is the state at the end of round 1. Nine more rounds follow (with the last omitting MixColumns), eventually producing the ciphertext 39 25 84 1d 02 dc 09 fb dc 11 85 97 19 6a 0b 32.
Open the Calculator tab and click Load FIPS-197 test vector to see all 10 rounds traced out automatically.