Round Structure

How AES Encrypts

AES processes your data in rounds. Each round scrambles the data further, making it harder to crack.

For AES-128 (the most common version), there are 10 rounds.


The Encryption Flow


Step by Step

Initial step: XOR the plaintext with the first key (K0K_0). This is called AddRoundKey.

Rounds 1-9: Apply all four operations: SubBytes, ShiftRows, MixColumns, AddRoundKey.

Round 10: Same as above, but skip MixColumns.


Why Skip MixColumns in the Final Round?

It’s a design choice that makes encryption and decryption symmetrical.

Without this, you’d need extra steps when decrypting. The math works out cleaner this way.


The Four Operations

Each round applies these operations in order:

OperationWhat it does
SubBytesReplace each byte using a lookup table
ShiftRowsShift rows left by different amounts
MixColumnsMix bytes within each column
AddRoundKeyXOR with the round key

Different Key Sizes, Different Rounds

Key SizeRounds
128 bits10
192 bits12
256 bits14

More key bits means more rounds. This ensures every bit of the key influences the final output.


Next, we’ll look at each operation in detail, starting with SubBytes.