Understanding Encryption

How Ciphers Work

From pen-and-paper codes to the mathematics behind modern security

Start with one message

Your first codebreak guides you through a library notice, repeating-key Vigenère, language assumptions and homophonic counts. Try the first lesson in about 15 minutes.

Find a classical cipher topic · Print the activities

Why History Matters

What Classical Ciphers Can Teach

Historical ciphers offer useful comparisons with modern substitution, permutation and key management. These comparisons explain concepts; they do not establish a direct historical path from a classical system to AES or another modern design.

Substitution → S-Boxes

Classical substitutions illustrate a basic idea also present in AES. Its nonlinear S-boxes operate with key mixing and diffusion; a fixed substitution table alone does not provide modern security.

Polyalphabetic → Stream Ciphers

Vigenère's repeating keyword and ChaCha20's pseudorandom keystream illustrate combining a message with a keystream. A ChaCha20 key can protect multiple messages, but nonces must not repeat under that key, and the block counter must not wrap.

Transposition → Permutation

Classical transpositions permute symbols. AES ShiftRows permutes byte positions and MixColumns combines bytes linearly; these are useful conceptual comparisons, not a claim of direct historical descent.

Rotor Machines → Block Ciphers

Enigma changes its substitution as it steps. Modern block ciphers use repeated designed round operations. Compare the mechanisms without treating one as a direct implementation of the other.

Lorenz → Computing

Manual cryptanalysis recovered Lorenz messages and inferred the machine before Colossus. From February 1944, Colossus accelerated statistical searches for wheel settings; it was an important early programmable electronic computer.

One-Time Pad → Perfect Secrecy

Shannon formalized perfect secrecy: an OTP achieves it for fixed-length messages when the pad is uniformly random, secret, independent of the message and never reused. Practical encryption often targets computational security with shorter keys. Information-theoretic and computational security are different guarantees, with different assumptions.

Three details that change a protocol

Follow these worked examples, then continue in the linked Crypto Lab activities:

Continue Learning

Explore by Topic

New to Cryptography?

Start with the Caesar Cipher

A fixed alphabet shift is a useful place to begin. Explore the cipher associated with Julius Caesar, then compare its limitations with the requirements of modern encryption.

Start with Caesar →

Reading

Joshua Holden, The Mathematics of Secrets: Cryptography from Caesar Ciphers to Digital Encryption (2017 edition), chapters 4–5; Claude E. Shannon, “Communication Theory of Secrecy Systems” (1949), §§10 and 23. These support the conceptual comparisons and perfect-secrecy conditions.