1
$\begingroup$

I am new to cryptography so there is one thing which is bothering me. I hope you kindly help me to understand.

Let's imagine an attacker harvest plaintext as well as ciphertext in OTP One Time Pad. I am aware of that OTP uses reverse XOR operation to encrypt the data, but the question is "Is it possible to actually obtain a key by XORING message(plaintext) and ciphertext?".

P.S. The encryption was implemented only once.

Thank you!

$\endgroup$
  • 2
    $\begingroup$ Yes. But discovering the key will not help the attacker, unless the key is not random as it should. If the XOR reveals the first bytes of the key to be "WE, THE PEOPLE OF THE UNI" then the crypto is busted - but that is because it was done wrong. $\endgroup$ – LSerni Oct 14 '17 at 22:48
  • $\begingroup$ Heads-up: OTP !== stream cipher $\endgroup$ – e-sushi Oct 15 '17 at 11:33
9
$\begingroup$

"Is it possible to actually obtain a key by XORING message(plaintext) and ciphertext?"

Of course it is; it's actually pretty easy.

On the other hand, those specific key bits were used once; their only use is to protect that specific plaintext; if the attacker learns (by whatever method) what those keybits were, he learns what the plaintext is. If the attacker already knew the plaintext (by whatever method), he doesn't have anything further to gain by learning those specific OTP key bits.

$\endgroup$
3
$\begingroup$

Yes just like you suggest:-

plaintext ⊕ ciphertext = key

but I would question why you'd want to do this? If you have the plaintext, then your attack was successful. You know what the message says. There is no point obtaining the key. A properly organised OTP operation will only use those key bits once for the message you have. They might even then be destroyed /deleted. They should never be needed again so there is no point in having them in the first place. The sender's next message will draw upon new key material. Confused emoji.

Unless, you suspect that the key material is being generated via an algorithm /pseudo random number generator. There are certain people out there who believe that they have discovered an improvement to the venerable OPT. This site has several questions concerning the veracity of clever techniques to avoid using a true random number generator. If you suspect that your sender is one of these confused people, yes there would be value in obtaining the key material in order to attack the generating algorithm. OTP - Reuse key BUT add IV and Hash functions to generate one time pad are good(?) examples of OTP v2 attempts.

$\endgroup$

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.