04 — Classical

Simple Substitution Cipher

Monoalphabetic — each plaintext letter maps to exactly one ciphertext letter.

Formal definition
Let Σ = {A..Z}. The key is a permutation π on Σ. Encryption and decryption:
C_i = π(P_i) # look up substitution row P_i = π⁻¹(C_i) # invert the permutation

Mechanism

The key is a permutation of the 26-letter alphabet. Each plaintext letter is replaced by its mapped counterpart.

Plaintext : A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M E.g. HELLO → ITSSG WORLD → VKXZE

Properties

Attack: Frequency Analysis — worked

English letter frequencies are highly non-uniform:

LetterETAOINSHR
Freq %12.79.18.27.57.06.76.36.16.0
Count. Tally each ciphertext letter. Suppose S appears 14%, X 9%, A 8% — well above the ~3.8% uniform average.
Map singles. Guesses: S→E, X→T, A→A/O. Single-letter words must be A or I — huge constraint.
Use digraphs & doubles. Most common digraphs TH, HE, IN; most common doubles LL, EE, SS, OO. If SS appears doubled often, S is likely E/L/O.
common words. Try THE pattern: a 3-letter word with pattern X?? appearing 5× is almost certainly THE — solving 3 letters at once.

Cipher breaks with ~25–50 letters of ciphertext. Big keyspace is irrelevant — the statistics of English do the work.

Verdict
Computationally trivial today. Historical importance: it set up the problem that Vigenère and Playfair tried to solve.
Exam one-liner: 26! looks strong, but monoalphabetic = frequency preserved = broken by counting.
← Prev
03 · Kerckhoffs's Principle
Next →
05 · Vigenère Cipher