HomeCybersecurityAES Avalanche Diffusion Map: Bit-Flip Probability by Round

AES Avalanche Diffusion Map: Bit-Flip Probability by Round

A 2D Monte-Carlo view of the AES-128 avalanche effect: run thousands of independent key/plaintext trials, each differing by one input bit, and watch a 128-bit × 11-round heatmap of per-bit flip probability converge from a single certain bit to a uniform 50% coin-flip.

Cybersecurity2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-symmetric-encryption ↗ Open standalone

Symmetric block ciphers like AES are only secure if a tiny input change — a single flipped bit — becomes statistically indistinguishable from a coin flip in every output bit after enough rounds. This 2D simulator runs a real, independently-implemented AES-128 key schedule and round function across thousands of Monte-Carlo trials, each with a fresh random key and a plaintext pair differing by exactly one bit, and accumulates a 128-bit × 11-round heatmap of how often each individual output bit actually flips. The result is the strict avalanche criterion made visible directly as data: a perfectly certain single bit at round 0 fanning out, within a handful of rounds, into a uniform field of 50% probabilities across the whole state — the statistical signature that makes AES ciphertext resistant to differential cryptanalysis.

⚙ Under the hood

A 2D Monte-Carlo companion to the 3D AES round-function simulator: run thousands of independent AES-128 trials, each with a fresh random key and a plaintext pair differing by one bit, and watch a 128-bit x 11-round heatmap of per-bit flip probability converge from a single certain bit at round 0 to a uniform 50% coin-flip by round 3-4 — the strict avalanche criterion made visible as accumulated statistics rather than a single run.

AESsymmetric encryptionblock cipheravalanche effectcryptographydiffusionmonte carlostatistics

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)