2
$\begingroup$

For Vigenere cipher, I understand

  1. Find period first (say we have p = 6)
  2. Find highest frequency of letter in each group (from 1 to 6) and assume it is "e" in plaintext

What if we have more than one letter with same frequency. For example, "j" and "y" having same frequency in p1 group. Which one should we consider when finding a key?

$\endgroup$

1 Answer 1

2
$\begingroup$

You should not just "pick the highest frequency character and assume it should be E" because it will probably fail most of the time, except if your ciphertext is really long.

If your alphabet is small enough (usually either 26 or 255), it would be wiser to try all the possibilities for each group, and to check if the output looks like real english (printable chars, correct frequency, etc). It will be almost as fast, and you'll be way more confident in your result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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