AES-128 encrypts a 16-byte block through 10 rounds of a substitution–permutation network (SPN). Each round mixes three operations that together give the cipher both confusion (non-linear byte substitution) and diffusion (every output bit ends up depending on every input bit and key bit):
SubBytes: s[i] = SBOX[s[i]] (non-linear GF(2^8) inverse + affine map)
ShiftRows: row r cyclically shifted left by r bytes
MixColumns: column c' = M · c in GF(2^8), M = [[2,3,1,1],[1,2,3,1],[1,1,2,3],[3,1,1,2]]
AddRoundKey: s[i] ^= roundKey[i] (XOR with a subkey from AES key expansion)
This simulator runs a real AES-128 key schedule (SubWord/RotWord/Rcon) and applies the exact round sequence — AddRoundKey, then 9× (SubBytes → ShiftRows → MixColumns → AddRoundKey), then a final SubBytes → ShiftRows → AddRoundKey — to two 128-bit plaintexts under the same key that differ in exactly one bit.
The strict avalanche criterion says a good block cipher should flip roughly half of the 128 output bits whenever a single input bit flips. The bar tracks the live Hamming distance between the two states as they diverge round by round — starting at 1 bit and, after just a couple of rounds of SubBytes+MixColumns diffusion, converging on ≈50%, i.e. the outputs become statistically indistinguishable from independent random blocks. This is the property that stops an attacker from inferring anything about the plaintext from small changes in the ciphertext.
- Step — advances one transformation (SubBytes, ShiftRows, MixColumns or AddRoundKey) at a time.
- Auto-Run — steps automatically at the chosen speed; pauses at the final round.
- New Key — draws a fresh random 128-bit key and plaintext, flips one random bit for the second block, and resets to round 0.