In this chapter, we will analyze two important metrics for cipher and plaintext analysis: the chi-squared statistic and searching for patterns (monograms, bigrams, and trigrams). When working with classic and modern cryptography, text characterization as technique is a very important part of the cryptanalysis backpack.
The Chi-Squared Statistic
The chi-squared statistic is an important metric that computes the similarity percent between two probability distributions. There ...