- Count all trigrams
- Count the steps in between all reoccurring same trigrams
- Calculate the GCD of steps between each reoccurring trigrams
- The most frequently occurring GCD is likely the key length of the cryptogram.
- Spit up the string by every nth (in authors case 4th character)
- Calculate the frequency of the letters
- Calculate the Index of coincidence of each string
- Iterate over every letter of the English alphabet and compare the mutual index between strings “a,b”, where the second string “b” is decrypted with each letter of iterated English alphabet.
- If the mutual index of coincidence is relatively high, then there is a strong chance that the according shift between key letters for first and second line have a correct distance in between them.
mikust / clunky_vigenere Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License