โ† Wiki Index / Computation & Algorithms / Advanced Encryption Standard
๐Ÿ’ป Computation & Algorithms

Advanced Encryption Standard

The Advanced Encryption Standard is a symmetric block cipher established by the National Institute of Standards and Technology in 2001 that processes 128-bit data blocks using key sizes of 128, 192, or 256 bits via an iterative substitution-permutation network over Galois fields.

Advanced Encryption Standard (AES) is a standardized symmetric-key block cipher in computation and algorithms that protects electronic information across planetary telecommunications networks, operating systems, and banking infrastructure. Originating as the Rijndael cipher developed by Belgian cryptographers Joan Daemen and Vincent Rijmen, AES was officially adopted in November 2001 by the United States National Institute of Standards and Technology (NIST) as Federal Information Processing Standards Publication 197 (FIPS PUB 197), superseding the aging Data Encryption Standard (DES) after an exhaustive five-year international public evaluation.

Unlike its predecessor, which relied on a Feistel cipher architecture, AES is constructed as an iterative Substitution-Permutation Network (SPN). It processes a fixed block length of 128 bits (16 bytes) organized as a two-dimensional four-by-four matrix of bytes called the State, supporting three standard key lengthsโ€”128, 192, and 256 bitsโ€”executed across 10, 12, or 14 transformation rounds respectively.

State Matrix and Round Transformations

Throughout cipher execution, the 128-bit block is mapped into a State array containing 16 bytes arranged in four rows and four columns:

State = [[s0,0, s0,1, s0,2, s0,3], [s1,0, s1,1, s1,2, s1,3], [s2,0, s2,1, s2,2, s2,3], [s3,0, s3,1, s3,2, s3,3]]

Each round of AES (except the final round) sequentially applies four modular mathematical transformations that satisfy Claude Shannon's dual criteria of confusion and diffusion:

1. SubBytes: Non-Linear Byte Substitution

SubBytes provides non-linear confusion by replacing each byte in the State matrix independently using an invertible eight-bit substitution box (S-box). The S-box construction is derived from finite field arithmetic over the Galois field GF(28) modulo the irreducible polynomial m(x) = x8 + x4 + x3 + x + 1 (hexadecimal 0x11B):

  1. Multiplicative Inversion: Each byte a is mapped to its multiplicative inverse aโˆ’1 in GF(28), with the zero byte mapped to itself. This non-linear mapping provides optimal resistance against differential and linear cryptanalysis.
  2. Affine Transformation: The inverted byte undergoes an invertible affine mapping over GF(2) involving bitwise matrix multiplication and addition with the constant byte 0x63, destroying simple algebraic symmetries in the field inversion.

2. ShiftRows: Cyclical Row Permutation

ShiftRows provides inter-column diffusion by cyclically shifting the bytes in each row of the State matrix to the left by a fixed offset equal to the row index:

  • Row 0 is unshifted.
  • Row 1 is cyclically shifted left by 1 byte.
  • Row 2 is cyclically shifted left by 2 bytes.
  • Row 3 is cyclically shifted left by 3 bytes.

This ensures that the four bytes of each column are dispersed into four distinct columns in subsequent rounds.

3. MixColumns: Linear Matrix Diffusion

MixColumns provides intra-column diffusion by treating each column of the State matrix as a four-term polynomial over GF(28) and multiplying it modulo x4 + 1 by a fixed circulant matrix C:

C = [[02, 03, 01, 01], [01, 02, 03, 01], [01, 01, 02, 03], [03, 01, 01, 02]]

Multiplication by 02 represents a left shift by one bit in GF(28) followed by conditional conditional reduction with 0x1B if high-bit overflow occurs. Because C is a Maximum Distance Separable (MDS) matrix with branch number five, altering a single byte in any input column causes all four bytes of that output column to change, achieving complete diffusion across the State within two rounds. In the final round of AES, MixColumns is omitted to ensure symmetry between encryption and decryption schedules.

4. AddRoundKey: Subkey Injection

AddRoundKey injects the secret key material into the State. Each column of the State is combined with a corresponding word from the round subkey using bitwise exclusive-OR (XOR) operations. This simple linear operation is the sole component of the cipher that directly incorporates the secret key.

Key Expansion Schedule

The AES Key Expansion algorithm generates a total of Nr + 1 round subkeys (each 128 bits in size) from the original master key K. The algorithm treats the key as an array of 32-bit words w[i]:

  1. The first Nk words are initialized with the master key bytes.
  2. For subsequent words, each word w[i] is generated by XORing the preceding word w[i โˆ’ 1] with the word Nk positions earlier: w[i] = w[i โˆ’ Nk] โŠ• w[i โˆ’ 1].
  3. For indices i that are multiples of Nk, a transformation is applied to w[i โˆ’ 1] before XORing: the four bytes are cyclically rotated by one byte (RotWord), substituted via the S-box (SubWord), and XORed with an iteration-dependent round constant byte (Rcon[i / Nk]).
  4. For 256-bit keys (Nk = 8), an additional SubWord operation is executed when i โˆ’ 4 is a multiple of Nk to accelerate non-linear confusion.

Hardware Acceleration and Implementation Security

Because software implementations relying on precomputed lookup tables (T-tables) access memory addresses dependent on secret key and plaintext bits, naive AES code is susceptible to cache-timing attacks. Attackers running co-located processes on modern microprocessors measure memory access latency to deduce table indices and reconstruct the secret key.

To resolve this vulnerability, modern CPU architectures integrate dedicated AES instruction sets (Intel and AMD AES-NI, ARMv8 Cryptography Extensions). Instructions such as AESENC and AESDEC execute complete rounds in dedicated, constant-time hardware pipelines, achieving data throughput exceeding 10 gigabytes per second while completely eliminating cache timing channels.

Technical Parameters of AES Cipher Variants

ParameterAES-128AES-192AES-256
Key Length (Nk words)128 bits (4 words)192 bits (6 words)256 bits (8 words)
Block Size (Nb words)128 bits (4 words)128 bits (4 words)128 bits (4 words)
Number of Rounds (Nr)10 rounds12 rounds14 rounds
Expanded Key Size176 bytes (44 words)208 bytes (52 words)240 bytes (60 words)
Quantum Security (Grover)64 bits96 bits128 bits

References

  1. Daemen, J., & Rijmen, V. (2002). The Design of Rijndael: AES โ€” The Advanced Encryption Standard. Springer Berlin Heidelberg.
  2. National Institute of Standards and Technology. (2001). Advanced Encryption Standard (AES). Federal Information Processing Standards Publication 197.
  3. Biham, E., & Shamir, A. (1991). Differential cryptanalysis of DES-like cryptosystems. Journal of Cryptology, 4(1), 3-72.
  4. Bernstein, D. J. (2005). Cache-timing attacks on AES. Research Report, University of Illinois at Chicago.
๐Ÿงฌ Support Open Science
Explore interactive science games on LowKey Games or browse scientific apparel & accessories in the CRV Science Shop.
๐Ÿ’ก Spot an inaccuracy or have primary literature to expand this article?
Submit a citation or revision note using your shared CRV Science / LowKey Games profile ID.
Suggest Revision