AES-256 encryption explained, without the marketing

7 min read

Huge cube of scrambled mosaic tiles with one small brass key resting in front

AES-256 is the Advanced Encryption Standard with a 256-bit key: a public, heavily studied way to scramble data so that only someone with the key can unscramble it. Nobody can break it by guessing the key. That's exactly why the number on the box tells you little: what decides your security is the mode it runs in, where the key comes from and how the app handles it.

AES-256 in one paragraph

AES is a block cipher. It takes 16 bytes of data and a secret key and, through 14 rounds of substitution and mixing, turns them into 16 bytes that look random. With the same key it can turn them back. It was chosen by the US National Institute of Standards and Technology (NIST) in an open competition and published as FIPS 197. It's used by your iPhone, your bank, your browser and messaging apps. "AES-256" means the key is 256 bits long; there are also 128- and 192-bit versions.

Keys, blocks and why 256 bits is enough

A 256-bit key has 2²⁵⁶ possible values. Written out, that's a number with 78 digits. Even if every computer on Earth tried billions of billions of keys per second for the age of the universe, they'd have covered a vanishingly small fraction.

So nobody attacks AES-256 by brute force. When encrypted data gets opened without permission, it's because of something around the cipher:

  • A guessable password that the key was made from.
  • A key stored somewhere reachable, like a server, a file next to the data, or a "recovery" system.
  • A wrong mode or a bug that leaks patterns or lets data be changed.
  • An unlocked device, where everything is already decrypted for the user.

Keep that list in mind. It's what the rest of this article is about.

Modes: why GCM matters

AES on its own only handles one 16-byte block. To encrypt a photo, you need a mode that chains many blocks together, and the choice matters a lot.

  • ECB, the naive mode, encrypts identical blocks identically, so patterns in the data show through. It's the textbook example of what not to do.
  • CBC and CTR hide patterns, but on their own they don't detect tampering. Someone can flip bits in the encrypted file and the app won't notice.
  • GCM (Galois/Counter Mode) encrypts and adds an authentication tag. If a single bit of the encrypted data is changed, decryption fails instead of returning corrupted or manipulated content. NIST specifies it in SP 800-38D.

GCM has one strict rule: never reuse the same nonce (a number used once) with the same key. Good implementations generate nonces carefully or use a fresh key per file so that can't happen.

Two tile mosaics, one leaking a hidden shape, the other uniform noise with a seal

The weak spot is the key, not the cipher

Most apps don't ask you for a random 256-bit key. They ask for a password, a PIN or a pattern, and turn it into a key. That step is where security is usually won or lost.

A good design uses a key derivation function such as PBKDF2, scrypt or Argon2:

  • It's slow on purpose. Each guess has to run hundreds of thousands of hash rounds, so an attacker trying millions of passwords pays for each one. OWASP's password storage guidance currently suggests at least 220,000 iterations for PBKDF2-HMAC-SHA512 and 600,000 for PBKDF2-HMAC-SHA256.
  • It uses a random salt, so the same password gives different keys for different people and precomputed tables don't help.
  • It doesn't store the key or the password. A wrong password produces a wrong key, which simply fails to decrypt.

A bad design stores the PIN in a settings file, keeps the key next to the data, or uses one fixed key for every user. Then "AES-256" is a lock with the key taped to the door.

Be realistic about short secrets too. A 4-digit PIN has 10,000 possibilities; even slow key derivation can't make that strong against someone with the encrypted files and time. Longer secrets, salts kept off the files and attempt limits all help.

Per-file keys and chunking

Two further design choices separate careful apps from the rest:

  • A key per file. If each photo has its own key, derived from a master key, then one exposed key reveals one file, not everything. It also makes nonce reuse across files impossible.
  • Chunking. Large files, like videos, are encrypted in chunks, each with its own authentication tag. The app can decrypt just the part you're watching, in memory, without writing a decrypted copy to disk. To stop chunks being reordered, swapped or cut off, the chunk number and an "end of file" flag should be authenticated too.
Film strip split into sealed chunks, each tied to its own small key

Decoding marketing: "military-grade", "bank-level"

These phrases usually mean "we use AES-256". That's good, but it's the minimum, not a differentiator, and it leaves out everything that matters. When an app says "military-grade encryption", ask:

  1. Which mode? GCM or another authenticated mode?
  2. Where does the key come from? Your secret, through a slow key derivation function? Or something the company holds?
  3. Can the company reset your password? If yes, they (or someone else) can reach your key.
  4. Is every file encrypted, including thumbnails and videos, or only some?
  5. Is it documented? A published security model is worth more than any adjective.

An app that can't answer these clearly hasn't earned the label. Our guide on whether photo vault apps are safe uses the same questions.

A worked example: Private Vault

Here's how one app answers those questions, as a concrete reference.

That last point connects to zero-knowledge encryption: when only you can produce the key, nobody else can open the data, including the people who made the app.

Quantum computers and AES-256

Quantum computers threaten some kinds of cryptography far more than others. The public-key systems used to exchange keys and sign data (like RSA and elliptic curves) would be badly broken by a large enough quantum computer, which is why new post-quantum standards exist.

Symmetric ciphers like AES fare much better. The best known quantum attack, Grover's algorithm, would in theory roughly halve the effective key strength, leaving AES-256 at around 128 bits, still far beyond any realistic attack. That's one reason AES-256, rather than AES-128, is the usual recommendation for data that has to stay secret for a long time.

The short version

  • AES-256 itself is not the weak point.
  • Ask for the mode: authenticated (GCM) beats unauthenticated.
  • Ask where the key comes from: a slow key derivation from your secret, never stored, is what you want.
  • Ignore "military-grade". Look for a documented design.

Questions

Can AES-256 be cracked?

Not by trying every key; there are far too many. Real attacks go after the password, the way the key is stored, or bugs in the app, not the cipher itself.

What does military-grade encryption mean?

Nothing precise. It usually means AES-256, which is a good standard, but says nothing about the mode, the key or how the app handles them.

Is AES-256 quantum safe?

It's considered the safe choice. Grover's algorithm would, in theory, roughly halve its effective strength to about 128 bits, which is still out of reach.

Does encryption slow down my iPhone?

Not noticeably. iPhones have hardware support for AES, and iOS already encrypts all your data with it.

Keep it private on your iPhone

No account. No analytics. Encrypted on your iPhone.

Get Private Vault