Algorithm Details for: Find Relative Shifts between Key Letters
- Split text into rows of the same length as the key.
- For each column, determine the frequencies of each letter.
- Find all MI(c) of each column with every other column.
- Search for the MI(c)'s closest to .065, this yields the relative shift from col i to col j.
- Form a system of equations and solve in terms of one keyletter.
- The keyword is a cyclic shift of the result.
The MI(c) is represented by the following equation:
Where n and m are the lengths of substrings f and h, f sub i is the frequency of letter i, and
h sub i - g is the frequency of letter i - g where 0 <= g <= 25.
Alogorithm taken from Stinson pgs 33 - 36 (see sources page).