I have a slight idea on what the attack would be. But my question is: how would one detect if n long messages (n>5) have been encrypted with the same one time pad, K?

  • 2
    $\begingroup$ Typically, you'd XOR the messages together pair-wise and see if the resulting bit distribution has some detectable patterns (because it should be the XOR of two plain texts). $\endgroup$ – SEJPM Feb 12 '17 at 20:42
  • $\begingroup$ With 5 messages you may simply be able to calculate (most of) the key stream. In that case the solution is easy: check if the plaintext is anywhere near the content you expect it contains. If the plaintext of the (additional) messages is fully random (for you) then - of course - you've got no way to check. $\endgroup$ – Maarten Bodewes Feb 12 '17 at 21:37

Specifically, the $K(K-1)/2$ symbolwise difference of the, say $K$, messages should obey the plaintext distribution. If the plaintext is in a natural language, patterns can be detected using various techniques.

If the messages are binary $n=5$ won't be nearly enough. If the messages are in ASCII, $5$ symbols yield 40 bits, so that might be enough, and you'd even rule out key guesses that don't yield printable ASCII characters when XORed with ciphertext.

| improve this answer | |
  • $\begingroup$ I think the OP is asking about 5 (or more) distinct messages, not about messages with 5 symbols each. That said, good answer. $\endgroup$ – Ilmari Karonen May 14 '17 at 14:54
  • $\begingroup$ I thought that too, but also wondered what effect the size of long messages would have. Longer messages should facilitate better statistical analysis of language plain text. $\endgroup$ – Paul Uszak May 14 '17 at 19:51

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.