5
$\begingroup$

One of the main rules of the OTP is, that a key should never ever be reused.

But if we use some commutative operation (XOR for example) for generating the cipher text, then I don't see any difference between the message and the key, so can we also say that a message should never be reused? With other words - even if we use different key for every message, could the system be weakened if we sometimes use the same message as before?

$\endgroup$

2 Answers 2

12
$\begingroup$

No, you can reuse a message as often as you want with the OTP. (But never reuse the key!)

What happens if you reuse a key? The attacker can xor the two encrypted messages (ciphertexts) and gets the xor of the two plaintexts. The xor of two messages is highly insecure and can be easily turned into two plaintexts with some know patterns.

What happens if you reuse a message? The attacker can xor the two encrypted messages and gets the xor of the two keys. What happens if you xor two fully random keys? The resulting string is also fully random, and it's not possible to get any information out of it. You see, there's no problem with reusing the message.

$\endgroup$
2
$\begingroup$

No. As the key should be fully random - a premise that invalidates the use of an OTP in practice - that should not matter at all.

$\endgroup$

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.