AES: pitfalls to avoid
The most common mistakes made by those who use AES in their own programs: wrong modes, weak keys, repeated vectors, lack of authentication.
Implementation and configuration mistakes
- Using ECB mode for real data.
- Reusing the same nonce with the same key in GCM or CTR.
- Using predictable initialisation vectors in CBC.
- Encrypting without authenticating: without an integrity check, encrypted data can be manipulated.
- Deriving the key directly from a password without a slow derivation function.
- Writing the key into source code or configuration files.
- Implementing AES yourself instead of using well-tested libraries.
AES: frequently asked questions
Short answers to the most common doubts about AES, key length, security and quantum computers.
The pages of this topic
Back to the overviewAES: how it works
The 16-byte state, the four steps of each round — SubBytes, ShiftRows, MixColumns, AddRoundKey — and the role of modes of operation.
AES: history
From the decline of DES to the NIST competition, from Rijndael’s victory to the publication of the FIPS 197 standard.
AES: the maths
The finite field with 256 elements, the construction of the S-box and the MixColumns calculation: the mathematics that makes AES robust.
AES: worked example
The official FIPS 197 test vector for AES-128 and how to use it to check an implementation.
AES: weaknesses and attacks
Theoretical attacks, side channels, misuse of modes and quantum computers: what really threatens AES.
AES today
Where AES is used every day — web, Wi-Fi, disks, messages, archives — and why it is considered adequate for the future too.