Skip to content
FoundationSource checked

AES

Encrypts fixed-size blocks with a symmetric key using repeated substitution and permutation rounds.

Quick Facts

Compact metadata for implementation and discovery.

Category
Cryptography
Difficulty
Advanced
Family
Symmetric Encryption
Tier
Foundation
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
11
Code example
Not ready
Visualization
Ready

Overview

AES transforms a 128-bit block through rounds of byte substitution, row shifting, column mixing, and round-key addition. Secure message encryption uses AES inside an appropriate mode of operation.

Core Concepts

block cipherround keysubstitution-permutation networkmode of operation

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n)

Average

O(n)

Worst

O(n)

Space

O(1)

When to Use

  • Use AES through a vetted cryptographic library.
  • Use authenticated modes such as GCM when confidentiality and integrity are both needed.
  • Use it when interoperating with systems that require standardized symmetric encryption.

When Not to Use

  • Avoid raw block encryption for multi-block messages.
  • Avoid reusing nonces or IVs in modes that require uniqueness.
  • Avoid implementing AES rounds manually for production security.

What It Does

  • Encrypts blocks with a symmetric key
  • Decrypts blocks with the same key

Use Cases

  • Data encryption
  • Secure storage
  • Encrypted communication

Inputs

  • Plaintext block
  • Symmetric key

Outputs

  • Ciphertext block

Key Formulas (1)

AES round

state = AddRoundKey(MixColumns(ShiftRows(SubBytes(state))))
state = AddRoundKey(MixColumns(ShiftRows(SubBytes(state))))

Shows the main transformation sequence used in a standard AES round.

Pseudocode

  1. 1.Expand the secret key into round keys
  2. 2.Mix the first round key into the block
  3. 3.Apply repeated substitution and permutation rounds
  4. 4.Mix in a round key each round
  5. 5.Return the encrypted block

Canonical Example

Input
plaintext block, AES key, and mode-specific nonce or IV
Output
ciphertext and authentication tag when using an authenticated mode
Explanation
AES encrypts blocks under the key, while the mode controls how blocks and nonces form a secure message encryption scheme.

Implementation Notes

  • Select the mode, nonce handling, padding, and authentication behavior explicitly.
  • Use library APIs that combine encryption and authentication when possible.
  • Keep keys separate by purpose and rotate them according to system policy.

Common Pitfalls

  • Using ECB mode for structured messages.
  • Reusing a nonce with the same key in nonce-based modes.
  • Confusing encryption with authentication.

Interactive Mechanism Walkthrough

Graph Frontier & Edge Relaxation

Show a block passing through repeated transformation rounds.

AES mechanism walkthrough step 1 of 5suvwxt
Step 1 of 5: Expand the secret key into round keys
block-cipher-rounds

Notes

AES is a block cipher primitive; the mode of operation determines how it is safely used on messages.

Sources (1)

What each reference supports for this entry.

NIST FIPS 197

Documentation

NIST Advanced Encryption Standard specification for AES-128, AES-192, and AES-256.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toChaCha20

AES and ChaCha20 are symmetric encryption primitives with different implementation tradeoffs.

Conceptual neighborFeistel Network

AES and Feistel networks are contrasting block-cipher construction styles.

Related Algorithms

Tags

CryptographySymmetric KeySecurity