Classical encryption


Plaintext and ciphertext


Rotate 13. It is its own inverse.


Revese the alphabet. It is its own inverse.

Verifying decryptions


verifying solutions when spaces are omitted. can rate fitness using corpus information on popularity


Caesar ciphers

Shift along in alphabet by \(c\).

Affine cipher

page on affine cipher too. like caesar but rather than +c, mx+c


For Caesar, only 26 possible keys, can just brute force.

For Affine, can also brute force.

Monoalphabetic substitution

Monoalphabetic substitution ciphers and keys

(key plus algorithm encrpyts and decrypts)

Breaking monoalphabetic substitution ciphers with frequency analysis

(need to identify algorithm and needs to identify key)

finding substitution cyphers

Search space is larger, \(26!=4*10^26\). need alternative to brute force.

Letter popularity. Compare against popularity for corpus. Monogram (ie letters); ngrams(ie n letter in a row frequency); common words.

Single letter words are I or A. More generally. corpus smaller for fewer letters

Can test substitution cypher by matching each word against a corpus

Polyalphabetic substitution

Polyalphabetic ciphers

Multiple substitution


Rotor machines

The Enigma machine

Breaking polyalphabetic ciphers with the Kasiski examination



( (eg sdrgdr is code for “meet at x on y”)

Transposition ciphers

Book cipher

Eg use Bible.

One-time pads