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?

up vote 1 down vote accepted

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
  • 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? – 2nce Dec 4 at 23:08
  • 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. – kelalaka Dec 4 at 23:11
  • Does this only work if I know what the two plaintexts and key are? – 2nce Dec 4 at 23:38
  • 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. – kelalaka Dec 4 at 23:40
  • 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? – 2nce Dec 5 at 0:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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