Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Let's say, I've got N strings encoded with "random" bytes using xor.

If I know that the information encoded is the same everywhere, is it possible for me to get at the information itself by doing some sort of manipulation with the data?

I've tried this with 3 strings (xor them with each other and than try to solve equations to get at the random bytes values) and to me it looks like it's impossible. Can anyone confirm or deny this?

share|improve this question
    
What do you mean by "the information encoded is the same everywhere"? That all String1 XOR Rand1 = X, String2 XOR Rand2 = X, ... StringN XOR RandN = X ? Or are the N strings the same? –  Henning Klevjer Jan 17 '13 at 9:03
    
String1=String2=String3=...=StringN –  Arsen Zahray Jan 17 '13 at 9:11
    
Okay. In ciph = o1 XOR o2, the only way you will get back to the original is to again XOR the result (ciph) with one of the operands (o1 or o2). –  Henning Klevjer Jan 17 '13 at 9:24
add comment

1 Answer

up vote 2 down vote accepted

No, this is not possible. Encoding a message using XOR and a key of equal length, randomly chosen from a uniform distribution, leaves you with a ciphertext that is equally likely as any other possible ciphertext, regardless of what the original message was. Therefore, without knowledge of the key, the encoded message tells us absolutely nothing about its secret.

The security is not compromised by running the algorithm again. It will yield a second number whose probability is also evenly distributed and more importantly, independant of the first ciphertext, as long as the keys are chosen independantly, even if the message is the same. Once again, these two numbers are equally likely as any other possible combination of two ciphertexts, regardless of the original message. So here too, the message stays a secret.

In fact, if this were not the case and multiple versions of the same message, but encoded with different keys, did reveal information, breaking the encryption would be trivial, even with only one ciphertext. An attacker could easily make more, by XOR'ing the ciphertext with another number, as this is equivalent to XOR'ing the message with a different random number.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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