Frequency Analysis.

Frequency analysis is the bedrock of decryption. All you do is count how many times each letter appears and compare that letter distribution with that of the target language. If the message has simply been reaaranged but not enciphered then the frequency distribution of the message will be the same as that of a standard passage of English.
If the message has been encoded with symbols or letter groups then a similar process can be applied.
Frequency analysis can also be done, quite effectively, with a pencil and paper.

Standard English and Transposition Ciphers.

Alphabetical Order

Rank Order

3000 Letter Magazine Article.

A transposition cipher takes the plaintext and jumbles it up. The frequency distribution of the letters remains the same as that of standard English.

Note that the frequency distribution for the 3000 letter text is not exact. In fact several letters do not appear in the same place in the order. To get anything approaching the ideal frequency distribution you need huge numbers of letters.

Mono-Alphabetic Substitution Ciphers.

This is the 3000 letter text enciphered using the codeword wrong with a mono-alphabetic substitution cipher.


Note that whilst the peaks don't have exactly the same heights the basic shape of the graph remains the same. The values tail down smoothly with a step in the R/D region.

2 Letter Viginere

This is the 3000 letter text enciphered using a 2 letter Viginere cipher.

This is a very different graph to tthat for a nono-alphabetic cipher. The high scoring letters such as ETAION are depressed and low scoring letters are pushed higher. The graph has been flattened out but still tails from left to right.

3 Letter Viginere

This is the 3000 letter text enciphered using a 3 letter Viginere cipher.

The distribution is now even flatter.

5 Letter Viginere

This is the 3000 letter text enciphered using a 5 letter Viginere cipher.

The distribution is now even flatter. Most of the peaks are between 4.5% and 2.5%. Note that even the lowest scoring letters now appear.

26 Letter Viginere

This is the 3000 letter text enciphered using a 26 letter Viginere cipher. The alphabet was used as the keyword.

The distribution is now almost flat across all 26 letters of the alphabet.

Playfair Cipher

This is the 3000 letter text enciphered using a Playfair cipher.

The distribution is similar to that of a 3 or 5 letter Viginere but note that J is missing from the ciphertext. Playfair or double Playfair ciphers always tend to have one letter of the alphabet missing completely.

Digraph Ciphers

11000 letters. Punctuation and spaces stripped out. Text put into pairs and counted with first letter across and second letter down. AE occurs twice. EA occurs 54 times.

Excel and other Tools.

Code Frequencies. Frequency analysis using Excel VBA.


Digraph counter. A more complex tool which will analyse frequencies for double letter pairs. Use this tool on ciphers that you suspect are based on the Playfair system. It can aslo be used on monoalphabetic ciphers in which the plaintext has been deliberately chosen to make analysis difficult.


EXCEL Programming

Frequency Analysis with Excel. Using a command button and a text box to generate letter frequency graphs and statistics.

Viginere Cipher. Excel VBA Using text boxes, command buttons and VBA programming to make and break viginere or similar poly-alphabetic substitution ciphers. Can be used for running key or autokey ciphers. You should have mastered shift ciphers before tackling this type of cipher.

last updated 10th June 2011