Algorithm Details for: Friedman Test

  1. for m = 1 to n
  2. Fill ROWS of rectangular array with dimensions m x (n/m) with consecutive substrings from the ciphertext of length m.
  3. Compute the IC of each COLUMN.
  4. Find the average of all the column IC’s.
  5. If the average IC is approx 0.065, break and m is the likely keyword length. Else continue loop.


Where n is the length of the cipher text being cryptanalyzed and IC is the Index of Coincidence for the text, as shown in the following formula:




Alogorithm taken from Lewand pg 90 - 92 (see sources page).