Advanced Encryption Standard (AES)
A symmetric block cipher chosen by the U.S. government to protect classified information. It is implemented in software and hardware throughout the world.
The Advanced Encryption Standard (AES), originally known as Rijndael, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001.
AES is a symmetric-key algorithm, meaning the exact same key is used for both encrypting and decrypting the data.
How AES Works
AES is a block cipher, which means it divides the plaintext into fixed-size blocks (128 bits) and encrypts each block one by one.
AES operates on a 4×4 column-major order array of bytes, termed the state. Depending on the key size, the algorithm performs a specific number of rounds of transformation:
- AES-128: 10 rounds
- AES-192: 12 rounds
- AES-256: 14 rounds
Each round consists of several processing steps that substitute, transpose, and mix the input plaintext to transform it into the final ciphertext.
Block Cipher Modes
Because AES only encrypts 128 bits at a time, encrypting longer messages requires a "mode of operation". Common modes include:
- ECB (Electronic Codebook): The simplest mode. Every block is encrypted independently. It is highly insecure for most uses because identical plaintext blocks produce identical ciphertext blocks, revealing data patterns.
- CBC (Cipher Block Chaining): Each block of plaintext is XORed with the previous ciphertext block before being encrypted. Requires an Initialization Vector (IV). Much more secure than ECB.
- GCM (Galois/Counter Mode): An authenticated encryption mode that provides both data confidentiality and authenticity (integrity). It is widely adopted for its performance and security and is the standard for modern protocols like TLS 1.3.