I understand that when a plaintext is encrypted with a key of the same length, it is referred to as a one-time pad. Now when this key is reused to encrypt another plaintext, there is potential for decryption of the original ciphertexts.

Following on from the question asked here, Taking advantage of one-time pad key reuse?, the ciphertexts there were retrieved via a Vernam cipher:-

$ciphertext = plaintext \oplus key$

which gave rise to the following relationship between the two:-

$ciphertext_1 \oplus ciphertext_2 = plaintext_1 \oplus plaintext_2$

If instead of a Vernam cipher the encryption is carried out via a Vigenere cipher, where I have two plaintexts and a key, all three of which are the same length - is it possible to draw any relationships like the one above, from the resulting ciphertexts, when I do not know what the plaintexts and key were?


The crib-drag attack applies with a different operator.

p1 = AtextencryptedByFirstPassword
p  = HelloHelloHelloHelloHelloHell
c1 = hxpihlrncmwxpopfjtcgatldgdsco

p2 = ASecondEncryptedTextBySecondPassword
p  = HelloHelloHelloHelloHelloHelloHelloH
c2 = hwpncuhpyqycaeskxpihicdpqvroaozwhzfk

When you $c_1 - c_2 \bmod 26$ you will have the same problem as many-time-pad. This subtraction will remove the key.

 c1[i] - c2[i] = p1[i] + key[i % len(key)] 

But this time instead of $\oplus$ we will have plus modulo 26.

 c1 - c2 = azafvjqcwecflqdfowgbijsmkszmm
  • $\begingroup$ Hi, thanks for answering! I just updated the question to include a mention that the two plaintexts I have and the key are all of the same length. Does this still apply? $\endgroup$ – 2nce Dec 4 '18 at 23:08
  • $\begingroup$ In order the crib-drag attack must be working, 1) keys must be same as in OTP reuse. 2) you have to have at least two ciphertext. more than two is better. The ciphertext lengths don't have to be same. $\endgroup$ – kelalaka Dec 4 '18 at 23:11
  • $\begingroup$ Does this only work if I know what the two plaintexts and key are? $\endgroup$ – 2nce Dec 4 '18 at 23:38
  • $\begingroup$ This attack is a ciphertext-only attack, no need to know the plaintexts. You have to have at least two ciphertexts encrypted under the same key. $\endgroup$ – kelalaka Dec 4 '18 at 23:40
  • $\begingroup$ Sorry I'm still relatively new to all of this and so a bit confused. Suppose p1 = orange and p2 = apples with k = circle (all three of them being length 6). This gives c1 = ogpykw and c2 = cxgnpw after encryption with Vigenere. How would i perform the crib-drag attack on c1 and c2? $\endgroup$ – 2nce Dec 5 '18 at 0:21

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.