Challenges › Cryptography

Break a Vigenere Cipher

medium · 100 XP · flag · free · solves: 0

A letter for the new keeper of a northern lighthouse was encrypted with a Vigenere cipher. The keyword is a single English word of 5 to 8 letters. You have only the ciphertext: no keyword and no known plaintext.

letter.txt holds the ciphertext. Spaces, punctuation, line breaks and letter case are kept. The key advances by one position for each letter only.

Work through these steps:

  1. Find repeated letter sequences and the distances between them (Kasiski).
  2. Compare the average index of coincidence for each candidate period.
  3. Split the letters into columns and solve each column as a Caesar shift.
  4. Decrypt the letter with the key.

vigenere_tools.py has helpers for each step. Run it without arguments to see the commands.

Check your answer with python3 verify.py PERIOD KEY plaintext.txt. It confirms the period, the key and the plaintext without revealing them. Write a short explanation for yourself of which evidence pointed to the period.

The last sentence of the letter names a phrase. Submit it in lower case with underscores between the words, inside CSEMA{...}.

Tags: learn

Try next