About the Ciphers
Last week we worked on monoalphabetic substitution ciphers -- ones which were encoded using only one fixed alphabet (hence the Greek root "mono" meaning "one"). As you saw, especially when the spaces between words are still there, these are fairly easy to break. Given a few minutes and several people working on a message, the secret contents are revealed. So, how can you make this harder? Well, one way is to use more than one alphabet, switching between them systematically. This type of cipher is called a polyalphabetic substitution cipher ("poly" is the Greek root for "many"). The difference, as you will see, is that frequency analysis no longer works the same way to break these.
One such cipher is the famous Vigenere cipher, which was thought to be unbreakable for almost 300 years! The Vigenere cipher uses the power of 26 possible shift ciphers (which we met last week).
How this Cipher Works
Example:
Keyword: | M E C M E C M E C M E C M E C M E C M E C M | Plaintext: | w e n e e d m o r e s u p p l i e s f a s t | Ciphertext: | I I P Q I F Y S T Q W W B T N U I U R E U F |
Thus, the urgent message "We need more supplies fast!" comes out:
I I P Q I F Y S T Q W W B T N U I U R E U F
So, as you can see, the letter 'e' is enciphered sometimes as an 'I' and sometimes as a 'Q'. Not only that, but 'I' represents two different letters, sometimes a 'w' and sometimes an 'e'. This renders our favorite tool, frequency analysis, nearly useless. Even though 'e' is used very often in the plaintext, the letters that replace it ('I' and 'Q') don't show up as frequently. Also, now if we check doubled letters in the ciphertext (say 'II' or 'WW'), these are not doubled letters in the plaintext.
You may, then, ask yourself "is there any hope?" Fortunately, there is! Given a long enough piece of ciphertext, certain words or parts of words (like "the") will line up with the keyword several times, giving rise to a repeated string of letters in the ciphertext ("the" may be enciphered as "KPQ" more than once). This can give us a clue as to the length of the keyword. After that, we can use frequency analysis on each piece that was enciphered with the same letter to crack the code. Consequently, cracking these ciphers hinges on finding repeated strings of letters in the ciphertext.
How to crack this cipher:
I C J E V A Q I P W B C I J R Q F V I F A Z C P Q Y M J A H N G F
Y D H W E Q R N A R E L K B R Y G P C S P K W B U P G K B K Z W D
S Z X S A F Z L O I W E T V P S I T Q I S O T F K K V T Q P S E O
W K P V R L J I E C H O H I T F P S U D X X A R C L J S N L U B O
I P R J H Y P I E F J E R B T V M U Q O I J Z A G Y L O H S E O H
W J F C L J G G T W A C W E K E G K Z N A S G E K A I E T W A R J
E D P S J Y H Q H I L O E B K S H A J V Y W K T K S L O B F E V Q
Q T P H Z W E R Z A A R V H I S O T F K O G C R L C J L O K T R Y
D H Z Z L Q Y S F Y W D S W Z O H C N T Q C P R D L O A R V H S O
I E R C S K S H N A R V H L S R N H P C X P W D S I L P L Z V Q L
J O E N L W Z J F S L C I E D J R R Y X J R V C V P O E O L J U F
Y R Q F G L U P H Y L W I S O T F K W J E R N S T Z Q M I V C W D
S C Z V P H V C U E H F C B E B K P A W G E P Z I S O T F K O E O
D N W Q Z Q W H Y P V A H K W H I S E E G A H R T O E G C P I P H
F J R Q
Challenge Problems
After you have tried the examples above, try the ciphers on the challenge sheet.
Other Links*