I'm new to cryptography and I was trying to find key to an intercepted vigenere ciphertext using ciphertext-only attack, I'm following book "cryptography and network security" by Forouzan. The book introduced some complicated formulas for finding Mutual Index of Coincidence but I didn't get it. This was mentioned in the text "So in order to find the actual key, we divide the ciphertext into m (key length obtained by Kasiski text) rows, each row is a shift cipher which have been shifted by a key say,Ki.Thus for each row we find the Mutual Index of coincidence with respect to an unencrypted English text. We compute the MI values by varying the keys, Ki from 0 to 25. The values for which the MI values become close to 0.065 will indicate the correct key, Ki. This process is repeated for the m rows to obtain the entire key."

I didn't get what this line means "Thus for each row we find the Mutual Index of coincidence with respect to an unencrypted English text"

Do I need to take second string a character/letter (which is denoted by it's numeric value if we assign numbers 0 to 25 to English alphabets) and find it's MI w.r.t row ?

In "Cryptography Theory and Practice" 4th edition by Douglas R. Stinson and Maura B. Paterson. They use "Mg" values.

Now this book states the following : "Assuming that we have determined the correct value of m, how do we de- termine the actual key, K = (k1, k2, . . . , km)? We describe a simple and effec- tive method now. Let 1 ≤ i ≤ m, and let f0, . . . , f25 denote the frequencies of A, B, . . . , Z, respectively, in the string yi. Also, let n′ = n/m denote the length of the string yi. Then the probability distribution of the 26 letters in yi is f0/n',..., f25/n'

Now, recall that the substring yi is obtained by shift encryption of a subset of the plaintext elements using a shift ki. Therefore, we would hope that the shifted probability distribution fki/n', ..., f(25+ki)/n' would be “close to” the ideal probability distribution p0, . . . , p25, where subscripts in the above formula are evaluated modulo 26. Suppose that 0 ≤ g ≤ 25, and define the quantity"

Please, provide me with an example solved either by Mg formula or by Mutual Index of coincidence method. I'm pretty much lost I can't afford high end institutions Mg formula

  • 2
    $\begingroup$ Does this answer your question or at least get you started? Words in “index of coincidence” in relation to the Vigenère cipher $\endgroup$
    – kodlu
    Aug 15, 2023 at 0:01
  • $\begingroup$ Also look at the related bar on the right, there are other answers describing index of coincidence $\endgroup$
    – kodlu
    Aug 15, 2023 at 0:04
  • $\begingroup$ Well, I already know to calculate IC but I'm struggling to find the key. Thanks for responding. $\endgroup$
    – Eternity
    Aug 15, 2023 at 6:35


Browse other questions tagged or ask your own question.