Skip to content
CryptographyInternals

Classical ciphers

Interactive, step-by-step visualizations of five classical ciphers: Caesar, Atbash, Vigenère, keyword substitution and rail fence.

How it is broken

How every one of them fell

These ciphers protected real secrets for centuries. Each was broken by one of two ideas, and modern cryptography is designed against both.

  1. 25keys

    Try every key

    A Caesar shift has only 25 useful keys and a rail fence a handful. Trying them all takes seconds by hand.

    Brute force and key size
  2. Emost common letter

    Count the letters

    Substitution keeps each letter’s frequency: the most common symbol is probably E. Even 26! ≈ 4 × 10²⁶ keys don’t help.

    Crack Caesar and Vigenère
  3. 128bits, mixed

    What changed

    AES has 2¹²⁸ keys and mixes every bit with every other, so no letter, pattern or frequency survives encryption.

    See inside AES