AES, the Advanced Encryption Standard, is a symmetric block cipher standardized by NIST in FIPS 197 in 2001. It encrypts data in 128-bit blocks using keys of 128, 192 or 256 bits, running 10, 12 or 14 rounds of substitution, shifting, mixing and key addition. AES-256 is the safest choice for long-term protection, but only when used with a secure mode such as GCM and proper key management.
Key takeaways
- AES is a symmetric cipher: the same key encrypts and decrypts, so protecting the key is the whole game.
- AES-128 uses 10 rounds, AES-192 uses 12, and AES-256 uses 14 — longer keys get more rounds.
- The mode matters as much as the cipher: use AES-GCM for new systems and never reuse a nonce.
Every time you visit a secure website, connect to Wi-Fi or unlock an encrypted drive, AES is probably doing the work. It is the most widely deployed encryption standard in the world, and it has protected data for more than two decades without a practical break.
What is AES encryption?
AES, the Advanced Encryption Standard, is a symmetric block cipher standardized by the US National Institute of Standards and Technology (NIST) in FIPS 197 in 2001. It replaced DES, whose 56-bit key had become breakable by brute force.
Symmetric means the same key encrypts and decrypts. That makes AES fast enough for bulk data, but it also means the key must be shared securely and protected carefully. NIST defines AES as a symmetric block cipher that can encrypt and decrypt data in blocks of 128 bits, as stated in FIPS 197. If the key leaks, the encryption is worthless.
AES was chosen in an open competition. NIST called for a replacement for DES in 1997, received 15 candidates, and narrowed them to five finalists: MARS, RC6, Rijndael, Serpent and Twofish. In October 2000, NIST chose Rijndael, designed by Belgian cryptographers Joan Daemen and Vincent Rijmen. It became effective as a US federal standard on May 26, 2002.
AES is the first and only publicly accessible cipher approved by the US National Security Agency for top secret information when used in an NSA-approved cryptographic module. That approval, plus 25 years of public cryptanalysis, is why it is trusted so widely.
How does AES encryption work?
AES works on 128-bit blocks of data, 16 bytes at a time. It arranges those bytes in a 4 by 4 grid called the state, then runs a series of rounds that mix the data with the key.
Each round uses four operations, as described in the Cipher Museum's AES description. SubBytes replaces every byte through a fixed substitution box, the only non-linear step, which defeats algebraic shortcuts. ShiftRows rotates each row of the grid left by 0, 1, 2 or 3 positions, moving bytes between columns.
MixColumns multiplies each column by a fixed matrix, so every output byte of a column depends on all four input bytes. AddRoundKey XORs the state with a round key derived from the main key. Together, SubBytes gives confusion and ShiftRows plus MixColumns give diffusion, so a change in one input bit flips about half the output bits.
Encryption starts with one AddRoundKey, runs the full round repeatedly, and finishes with a last round that omits MixColumns. The key schedule expands the main key into a separate round key for every round, so no two rounds use the same key material.
What is the difference between AES-128, AES-192 and AES-256?
The three AES variants differ in key length and in the number of rounds. AES-128 uses a 128-bit key and 10 rounds, AES-192 uses a 192-bit key and 12 rounds, and AES-256 uses a 256-bit key and 14 rounds. Longer keys get more rounds so the extra key material is mixed in thoroughly.
| Variant | Key size | Rounds | Round keys | Brute-force cost |
|---|---|---|---|---|
| AES-128 | 128 bits (16 bytes) | 10 | 11 | 2^128 operations |
| AES-192 | 192 bits (24 bytes) | 12 | 13 | 2^192 operations |
| AES-256 | 256 bits (32 bytes) | 14 | 15 | 2^256 operations |
All three use the same 128-bit block size. The block size never changes; only the key and the round count do. In practice, AES-192 is rarely used, because teams choose either the faster AES-128 or the stronger AES-256.
Brute force is not a realistic threat to any of them. Trying every AES-128 key would take far longer than the age of the universe with any conceivable computer. The published biclique attack on AES-128 has a complexity of about 2^126, which is only slightly faster than brute force and still completely infeasible.
Is AES-256 better than AES-128?
Yes, AES-256 is stronger on paper, and it is the safer choice for new systems. The question is whether the extra strength matters for your data.
For data that only needs to stay secret for a few years, AES-128 is already far beyond any practical attack. For data that must stay secret for decades — medical records, legal documents, state secrets — AES-256 gives a larger safety margin, especially against future quantum computers.
Grover's algorithm, a quantum search method, roughly halves the effective key length. That would leave AES-128 with about 64 bits of quantum security, which is uncomfortably low, while AES-256 would still offer about 128 bits. The US government's CNSA 2.0 guidance specifies AES-256 for National Security Systems for this reason.
AES-256 costs little extra on modern hardware, which often has dedicated AES instructions, so there is rarely a good reason to choose AES-128 for a new system. If you are maintaining an existing system that uses AES-128, there is no urgent need to change it.
Which AES mode should you use?
AES by itself only encrypts one 128-bit block. A mode of operation decides how to encrypt longer messages, and the mode matters as much as the cipher. Using AES with the wrong mode can leak patterns or allow tampering even though the cipher itself is sound.
AES-GCM is the recommended mode for new systems. It combines encryption with authentication: it encrypts the data and produces a tag that proves nobody tampered with it. It is fast, widely supported, and used in TLS, which protects HTTPS. Use it unless you have a specific reason not to.
AES-CBC is an older mode that encrypts each block chained to the previous one. It provides secrecy but no authentication on its own, so it must be paired with a separate message authentication code, and it has a history of padding oracle attacks when implemented badly. Avoid it for new systems.
AES-ECB is the simplest mode and the most dangerous: it encrypts each block independently, so identical plaintext blocks produce identical ciphertext blocks. That leaks patterns in the data. Never use ECB for real data.
Whatever mode you choose, never reuse a nonce or initialization vector with the same key in GCM or CTR modes. Reusing a nonce in GCM can expose the authentication key and destroy both secrecy and integrity. Generate a fresh random nonce for every message.
Where is AES used?
AES is everywhere, often invisibly. HTTPS uses AES through TLS to protect web traffic, and you can check a site's TLS setup with our free SSL checker. Wi-Fi uses AES in WPA2 and WPA3, so your wireless traffic is encrypted between your device and the router.
Full-disk encryption uses AES too: BitLocker on Windows, FileVault on macOS, and LUKS on Linux all encrypt the whole drive with AES, so a stolen laptop does not give up its files. VPNs use AES to protect the tunnel, messaging apps use it to protect messages, and cloud storage providers use it to protect files at rest.
Password managers also rely on AES to protect your vault. The master password derives an AES key, which encrypts every stored password. That is why a strong master password matters so much: the encryption is only as strong as the key that protects it.
If you use a VPN, you are using AES as well. Our guide to the best open source VPNs explains how to choose one whose apps and audits you can verify.
Why is key management the hardest part of AES?
AES itself is sound. The failures happen around it: keys that are too weak, keys stored in plain text, keys shared insecurely, or keys that are never rotated. A 256-bit key generated from a weak password is only as strong as that password.
Generate keys from a cryptographically secure random source, never from a human password directly. If a key must come from a password, use a proper key derivation function such as Argon2, scrypt or PBKDF2 with a high iteration count and a unique salt.
Store keys separately from the data they protect, ideally in a hardware security module or a key management service, and rotate them on a schedule. When a key is retired, destroy it securely so old backups cannot be decrypted with it later.
Also remember that encryption is not authentication. AES-GCM gives you both, but raw AES in CBC or CTR mode gives you secrecy only. An attacker who can modify ciphertext without detection can sometimes trick the receiver even without knowing the key, which is why authenticated modes matter.
What mistakes break AES in practice?
The most common mistakes are all outside the cipher itself. Reusing a nonce with the same key in GCM is the worst, because it can expose the authentication key. Using ECB mode leaks patterns in the data. Storing a key next to the encrypted data defeats the point of encrypting it.
Other mistakes include deriving a key from a short password without a proper derivation function, hardcoding a key in source code, logging a key by accident, and never rotating keys after an employee leaves or a system is compromised.
Developers should also avoid writing their own AES implementation. Use a well-tested library — OpenSSL, libsodium, or your platform's standard cryptography library — and use its high-level authenticated encryption API rather than assembling the cipher, mode and authentication yourself. You can test hashes and encodings with our free hash generator.
Finally, do not assume encryption alone makes a system secure. A site with AES-encrypted traffic can still leak data through weak passwords, unpatched software or phishing. Encryption is one layer, and it needs the others around it.
The bottom line
AES is a symmetric block cipher that encrypts 128-bit blocks with a 128, 192 or 256-bit key over 10, 12 or 14 rounds. It is fast, widely supported and has survived 25 years of public cryptanalysis without a practical break.
Choose AES-256 with AES-GCM for new systems, generate keys from a secure random source, never reuse a nonce, and use a tested library instead of writing your own. You can check whether a site uses TLS correctly with the free SSL checker.
Frequently asked questions
What is AES encryption in simple terms?
AES is a standard method for scrambling data so only someone with the right key can read it. It takes a 128-bit block of plaintext, mixes it through several rounds of substitution and shifting using the key, and produces ciphertext that looks random without the key.
What is the difference between AES-128 and AES-256?
AES-128 uses a 128-bit key and 10 rounds, while AES-256 uses a 256-bit key and 14 rounds. AES-256 is harder to brute force and is recommended for long-term protection, especially against future quantum computers, but both are considered secure today.
Is AES encryption safe?
Yes. No practical attack breaks AES itself, and it is the only publicly accessible cipher approved by the NSA for top secret information when used in an approved module. Most real failures come from bad modes, reused nonces or leaked keys, not from AES itself.
What is AES-GCM?
AES-GCM is a mode of operation that combines AES encryption with authentication. It encrypts the data and produces a tag that proves nobody tampered with it. It is the recommended mode for new systems, including TLS, because it is fast and provides both secrecy and integrity.
Can AES be broken by quantum computers?
Grover's algorithm roughly halves the effective key length, so AES-128 would offer about 64 bits of quantum security while AES-256 would offer about 128 bits. That is why AES-256 is recommended for data that must stay secret for decades.
Where is AES used?
AES is used in HTTPS through TLS, Wi-Fi through WPA2 and WPA3, full-disk encryption in BitLocker, FileVault and LUKS, VPNs, messaging apps, cloud storage and password managers. It is the most widely deployed encryption standard in the world.
What is the difference between AES and RSA?
AES is symmetric, so the same key encrypts and decrypts, and it is fast enough for bulk data. RSA is asymmetric, using a public key to encrypt and a private key to decrypt, and it is much slower. Systems usually use RSA or similar methods to exchange an AES key, then use AES for the data itself.
How do I choose an AES key size?
Choose AES-256 for new systems, especially for data that must stay secret for years. AES-128 is fine for most current uses and is faster on some hardware, but AES-256 costs little extra and gives a larger safety margin.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against NIST FIPS 197, the AES specification and standard descriptions of its rounds, key sizes and modes of operation.
How we write and fact-check →