Skip to content
CryptoAcademy logo CryptoAcademy
Menu
Intermediate Cryptography

Avalanche effect

A small change in the input produces a completely different hash.

Avalanche effect at a glance
The avalanche effect: flipping one input bit changes about half of the output bits INPUT BITS OUTPUT BITS (256) "cat" "cbs" 1 bit flipped Avalanche effect Flip one input bit → on average half of the 256 output bits change. No pattern, no similarity. That is why "cat" and "cbs" hashes look nothing alike — and why hashes never leak structure. original bit different output bit flipped input bit unchanged / zero

In simple terms

Change one character and roughly half of the output bits flip. Similar inputs do not give similar hashes.

Analogy

Dropping a pebble that triggers a landslide: the tiny cause and the huge effect look unrelated.

Going deeper

Good diffusion (a term from Shannon) makes every output bit depend on every input bit. In SHA-256 the message schedule and round function spread a single flipped bit across the whole state within rounds — the measurable result is ~128 of 256 bits differing on average.

Common mistake

Never expect that similar inputs produce similar hashes.

Share this page

Send this link to a friend, or scan the QR code to open it on your phone.