In ciphertext only attack, if I assume that the ciphertext is obtained by an OTP, then for a short length of ciphertext I can search over a random keystream of the same length and discover a plaintext which is meaningful, say in the language of the plaintext. Hence I get a most probable plaintext/ciphertext pair. This can be repeated over other segments of ciphertexts and the corresponding plaintext can be recovered. Hence does this mean ciphertext only attack can always be transformed to known plaintext attack of a certain block length?


Any plaintext input with the correct OTP could result in the ciphertext you have. For example, suppose you have ciphertext:

45 F1 C3 29

The plaintext could be LOVE (or Love or love) with the right OTP. It could also be HATE (or Hate or hate). Or it could be any other four letter word. Or a three letter word with a space or a period. You get the idea.

This is what makes an OTP so powerful from a crypto perspective. The requirements are that the OTP be random and that be as long or longer than the plaintext.

  • $\begingroup$ Many thanks. I missed out the point. $\endgroup$ – Viren Sule Sep 3 '20 at 1:01
  • $\begingroup$ Point well taken in the answer by Swashbuckler. But even if there are likly many plaintexts possible from the same ciphertext in random search, the context and language recognition will give a resonably close match to the exact plaintext. Hence I wanted to say that the ciphertext only attack can be transformed into a known plaintext attack at least over a partial block size. $\endgroup$ – Viren Sule Sep 3 '20 at 5:01
  • $\begingroup$ But if both "LOVE" and "HATE" are reasonable plaintexts, how do you know which one is correct? $\endgroup$ – Eugene Styer Sep 3 '20 at 13:21
  • $\begingroup$ @EugeneStyer You don't - that's the point. You can't brute force an OTP that's done correctly. $\endgroup$ – Swashbuckler Sep 3 '20 at 21:49
  • $\begingroup$ @VirenSule There is no "block size" with an OTP. It's a stream. $\endgroup$ – Swashbuckler Sep 3 '20 at 21:50

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.