I have two messages $m_1$ and $m_2$ and a result ciphertext $c$, one-time pad was used to create the ciphertext $c$, is it possible to know which message was used to generate the ciphertext $c$?

  • 2
    $\begingroup$ Welcome to Cryptography. Hint: If I've given a single bit $c$ as ciphertext to you, can you say that the plaintext $m$ is 1 or 0 without knowing the key bit $k$? $m \oplus k = c$? $\endgroup$
    – kelalaka
    Dec 4, 2020 at 16:38

1 Answer 1


No, not if the messages $m_1$ and $m_2$ have an identical length.

A one-time pad can produce any ciphertext from a message, so you wouldn't know which message was used.

If the messages differ in length than you would know, because the resulting ciphertext from a one-time pad has the same length as the original message.

This is of course assuming that you don't extend the shorter message with additional information to match it's length to the longer message or vice versa, somehow shorten the longer message.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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