← Hall of Foundations Exhibit 151 · H = −Σ p log p
The Measure of Surprise

Counting what
you don't know

Shannon gave uncertainty a number. Entropy measures how surprising a source is — how many bits of genuine unknowing it holds. It's why the one-time pad is provably unbreakable, and why a weak password falls in seconds regardless of how the cipher is built.

Secrecy is bounded by surprise. No cipher can protect a key that wasn't surprising to begin with. Entropy is the ceiling on security — everything else is just not wasting it.
§1

Bits of the unknown

A fair coin holds exactly one bit of entropy: two outcomes, equally likely. Bias the coin and the entropy drops — a coin that's 90% heads barely surprises you. Drag the bias and watch the entropy fall from its peak.

Entropy peaks at 1 bit when the coin is fair and collapses toward 0 as it becomes predictable. Maximum uncertainty means maximum secrecy-carrying capacity.
§2

Why key length is destiny

Every character of a password or key adds entropy — but only as much as its alphabet allows. The comparison below shows how fast real key strength grows with length and character set. This is the arithmetic behind every "use a longer passphrase" warning.

Bars show total entropy in bits for three alphabets. As a rule of thumb, 128 bits is the modern floor for a symmetric key — the dotted line.
§3

The one-time pad's perfect secret

Shannon proved that if your key is truly random, at least as long as the message, and never reused, the ciphertext reveals nothing — perfect secrecy, unbreakable even with infinite computing power. The catch is entropy: you need as many truly random bits as message bits, which is exactly why the pad is rarely practical.

Perfect secrecy exists. It just costs one bit of true randomness for every bit you want to hide.
Where this touches your keys

The ceiling on everything

The One-Time Pad’s perfect secrecy is this measure made physical. A cipher fed a low-entropy key is broken before the algorithm runs — the attacker just searches the small space of likely keys. Entropy is why the random number generator matters as much as the cipher.

Be careful with the phrase "128-bit security," though — it means two different things. For a symmetric cipher it really is a statement about surprise: AES-128 has 2¹²⁸ keys and no better attack than trying them. For a public-key scheme it is a statement about arithmetic difficulty: a 256-bit elliptic curve is called 128-bit-secure because the best known discrete-log attack costs about 2¹²⁸ operations, not because the key holds 128 bits of entropy. Same label, different claim — which is why key sizes across the two families are not comparable.

Where the ceiling is reached: the One-Time Pad spends exactly as much key entropy as it has message, which is what buys perfect secrecy — and Vernam's 1917 machine is that idea built in hardware, decades before Shannon proved why it works.