2
$\begingroup$

I took a cryptanalysis class in university and I learned Caesar Cipher. But I cannot understand why frequency gives me the "key".

In a meterial, the following sentences are explained:

When Eve tabulates the frequency of letters in this ciphertext, she gets: I=14, V=13, S=12, and so on. The most common character is I with 14 occurrences. This means key = 4.

What I cannot understand is the last sentence, "This means key = 4". Most frequency alphabet is "E" which has 12.7 frequency and the number of "E" is 4 I know. But how can I compute it from the frequency? I want to totally understand this mechanism.

$\endgroup$
2
$\begingroup$

This will make it more clear:

A B C D E F G H I J ...
0 1 2 3 4 5 6 7 8 9 ...

The Caesar cipher starts with the letter and goes through the alphabet using the key, wrapping around after 'Z'. So if 'I' is the most common letter then this is probably the enciphered letter 'E'. And since index('I') - index('E') = 8 - 4 = 4, that's the key that was used.

Note that E is only the most common letter for English text and only if other characters like space are not counted. It may not be the most common letter in small ciphertext.

$\endgroup$
  • 1
    $\begingroup$ To speed things up: Two letters in a row can also make things easier to find a possible match. For the English language the most common one is "th". $\endgroup$ – AleksanderRas Aug 30 '18 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.