Monogram, Bigram and Trigram frequency counts

Cryptography Home Classical Cryptography Classical Cryptanalysis Modern Cryptography Modern Cryptanalysis Latest Updates Links

Back to: [Classical Cryptography and list of ciphers] [Classical Cryptanalysis] [Cryptography Home]

On this page: [Introduction to Frequency Analysis] [Monogram counts] [Bigram counts] [Trigram counts] [References]

This page is still under construction

Introduction to Frequency Analysis

Frequency analysis is the practice of counting the number of occurances of different ciphertext characters in the hope that the information can be used to break ciphers. Frequency analysis is not only for single characters, it is also possible to measure the frequency of bigrams (also called digraphs), which is how often pairs of characters occur in text. Trigram frequency counts measure the ocurrance of 3 letter combinations.

When talking about bigram and trigram frequency counts, this page will concentrate on text characterisation as opposed to solving polygraphic ciphers e.g. playfair. The difference is that text characterisation depends on all possible 2 character combinations, since we wish to know about as many bigrams as we can (this means we allow the bigrams to overlap). When cracking playfair, we do not allow the bigrams to overlap.

Monogram Counts

Monogram frequency counts are most effective on substitution type ciphers such as the caesar cipher, substitution cipher, polybius square etc. It works because natural english text follows a very specific frequency distribution, which is not masked by substitution ciphers. The distribution looks like:
English Letter Frequencies
The following javascript will count the occurance of each character and display the result. See this section on applications of frequency counts for solving substitution ciphers.

References

Choose your way out: [Classical Cryptography and list of ciphers] [Classical Cryptanalysis] [Cryptography Home]
[Modern Cryptography] [Modern Cryptanalysis]

Copyright James Lyons - 2007 - No reproduction without permission
dsplabslinuxkamilcryptojames