CSC450 - Lab 2
Cracking Ciphers

Assigned Sep 13
Due Sep 20th Beginning of Class


Vigenere Ciphers

Implement the algorithm discussed on page 74 of the textbook for performing cryptanalysis on Vigenere-encoded ciphertext.

You may write this in either Java or Python.

  1. Analyse the text searching for frequent substrings of length 3.
  2. Find the greatest common denominator of the repetition distance for the 4 most frequent substrings.
  3. Split the ciphertext into subparts based on this greatest common denominator.
  4. Use Chi-Squared analysis to determine the most likely shift for each subpart.
  5. Piece back together the translated subparts to form the complete plaintext.

You must decode the following messages, and share with me a Google Doc that includes the message and keyword used to encrypt these messages

RCSMQBLCKBQLCHYIVSQHYMSECGKQQXUVVBJOPHZAPYZZVZKXRVVUKXBHFAWPDSIBJOQZZVICYBUITBMKJWHYSHIIIOMI
JNQBRIEMQBRCKIMOYFDACQYWEAVKQSRWHDPCLJNOQOELDIMDGWUSLUVVFDFSDBQNGSKWUVCSGVQWMFVIPNZMRANOCDKW
UKWKVMPNRVVPGKPHRKJOYBUBJORVFCUKLREIVEPOCAJYAYJBJKRTCMURGGYMKBRCKQUKACEAWWKOKQQXBSMWWDJMKWDO
UWJPFDMRZMVYQZVMRDMGCMGZNSIKJKLQVBQNPSRUCIRVVZGCRVVZWLDCIQPDFOKANOCDFNFOYHYEJKRRIMCWQARGEYKS
NPGXUSYIXOQVLNHVCRFNHDFWJUQBROCKQSJALAVQGJVCUZYIJMVRCFVAVRCFVAROAHKPCDKOBMUMYZRUKDWCWAQVMBXT
KPCTFZYRMKFCNNZSRZVRCKYQRCYBUAEYPBJWHDGAVBJOMDGZGCQCIAYBMBXBJONFFCFWYBJKQXRIDMNIRVVXCXEGFNFO
QDZAGNJCMMVRCZREUNCZRGVRCWEAQVCBTMQPMTWQEOYBUBJOQDLZPCRVRBRKRWVVVWCFZBQPRVVCPGMFKPADYYVAYRCB
YMJSKGVTHWGUYBJSQELQGDSGDIMOUWKPCLYFVJQNIWEEJYUCLTFPYFUMNCZSRZVYEFLVVKLRJEGKRIELGBYKVITIJWWM
DERHYIVDFSUZGKBCWAQWCHYQPQYTKMTNCOKPVRCIELKCACMMTNACLVVBWTIWOGFCJMDYSFEVQDPOMMNVCFIMVEPBJXWJ
XZVAVRCKZTNKLRDIMOQIJZCDFSIJGKPHYWUOGZCAYOFOMMVRYBWTADMCKPGBQHYIVGCYEWYXMHFNVRSGTWPCAWVVEOBC
VAOKISTWYKPRJWHEQOCTCXBHYCUDFSEIVSTSYCGYDFVAQVSHZWPSQGZKMVGSUWGBUWKPVRCDRTGMYGKWHDFCLOJDYBUM
PDCFGZKCCGFNIBCOKXKDFOELOYKSEBYSRVKPKCPSXITNRVVQTMSFIMPDQHLZPKUFPIPNJCJMVRCBRUGYDOTBKYLGFNVI
MIEWYDFSWIKBMDYMNSYBPURRGBKPAYPWJWPCZSRTNWWGZVUBCAVUDOPR

EVVSRYRZDKZHJHFYSZTTLGKOLHSKTLAZRYPZKVSXEWETEPVFUPPOCLQSOKCLWRTOIOKVTALMZSXEHYEOPKZTEDOCLVHS
JAQEVVRBHSKWLLBUIPLWUHLHWNIPSKVHXOGFMBEVZNDECUOQZCNEQECXOLFHRNAECFCLWRKOMWOPBXWZJOTPGRTFYHYE
EZIJETPRZDKZHYIKROKAIWGFAIWKVCLFZUDLHOJTLDWKSFEGZTPTHRNAHSUIAYCKLFVSZTKZHFNBWWKTIPPZTXYRKHBY
GFMBEVZNDHSETYFAGHLHHYAQMIDPJLRVUPUIDPTPZFOHPRKHBYKVSXHVZMPESGIKZBKHBXOKWBWCFKBOOEDTPGRWETAK
HBNOKIKEVVHXE

For extra credit, implement an alternative method using the index of coincidence discussed in class.

What to turn in

  1. VigenereCracker.java or
  2. VigenereCracker.py