Skip to main content
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32015
    Anonymous
    Inactive

    How would you find the key length of a Vigenère Cipher of you only had the cipher text?

    #32068
    Anonymous
    Inactive

    As the elves have now confirmed the cipher type.

    To find the key length:

    Repetitions in the ciphertext indicate repetitions in the plaintext and the distance between repetitions (or factors) point to the length of the keyword. This method was discovered by Friedrich Kasiski and Charles Babbage separately.

    or…

    Use the Index of Coincidence. The probability that any two randomly chosen letters are the same is about 0.067 (6.7%) for English. Shift the ciphertext by 1, then 2, then 3 etc …. positions and count the characters that are the same (and in the same position) in both original and shifted strings. Divide by the string length to normlise the results. The key length (and multiples) i.e. the shift number, will usually show peaks at about 6-7%. This method was discovered by William Friedman.

    or…

    Use some computing power to test all possible key lengths. For each key length tried, measure the chi squared value(s) for the 26 possible cipher shifts.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.