All articles

AES: how symmetric encryption works

AES was not always called AES. In 1997 the U.S. National Institute of Standards and Technology (NIST) opened a public competition to replace the aging DES, and in 2001 it selected Rijndael, a cipher designed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen. It was published as FIPS 197 and renamed the Advanced Encryption Standard.

A competition, not a government design

That process matters: NIST didn't design AES in-house, it ran an open five-year evaluation where cryptographers worldwide could attack every candidate. Rijndael won specifically because it held up under intense public scrutiny while also being efficient in both hardware and software — a rare combination that's part of why AES is now trusted well beyond U.S. federal systems, from banking to messaging apps.

Modes of operation: CBC vs. GCM

AES encrypts data in fixed-size blocks, so the mode of operation determines how those blocks relate to each other. CBC (Cipher Block Chaining) chains each block to the previous one, providing confidentiality but not checking data integrity. GCM (Galois/Counter Mode) adds authentication, meaning it encrypts data while also guaranteeing it hasn't been tampered with — which is why it's the recommended default in modern protocols like TLS 1.3.

Why an initialization vector (IV) is needed

If you encrypt the same data with the same key with no additional variation, the result is always identical — which leaks information about repeated blocks. The initialization vector is a unique random value added to each encryption operation, guaranteeing a different output even for identical input data and the same key.

Why you'd need this

  • Encrypting sensitive data before storage or transmission over a network.
  • Understanding the difference between encryption modes when choosing a library or protocol.
  • Diagnosing compatibility issues when decrypting data encrypted by a different system.

AES-128 versus AES-256: is a longer key needed

Intuitively it seems like a twice-as-long key means twice the protection, but in practice AES-128 is still considered cryptographically secure today — no practical attack capable of breaking it exists. AES-256 gives a larger safety margin against future theoretical breakthroughs (including quantum computing), at the cost of somewhat higher computational overhead, so the choice between them is a tradeoff between performance and safety margin, not "secure versus insecure."

Try the tool