I have two different hexadecimal strings (of same length) that I think are encoded plain text strings.

Out of curiosity I XORed them and I found a single hex byte repeated for the length of the two hex strings.

Does it mean anything about the key or the algorithm used to encode the two original strings?

Thank you in advance for your help. :)


Here is an example:

  • String1: 12345678
  • String2: b294f6d8
  • XOR: a0a0a0a0

And I think I may know part of the plain text.

  • $\begingroup$ Do you know anything about the plaintext? $\endgroup$ – bmm6o Mar 5 at 1:43
  • $\begingroup$ Maybe a padding block and that the repeated byte is the amount of padding (PKCS#5)? $\endgroup$ – conchild Mar 5 at 7:30
  • $\begingroup$ Sure, it is likely that the XOR value you're seeing was used on string 1 (the one that makes most sense) to obfuscate it, giving you string 2. I call it obfuscation because a repeated single byte key is so easy to crack we cannot call it encryption. $\endgroup$ – Maarten Bodewes Mar 5 at 15:24
  • $\begingroup$ @MaartenBodewes, it was just a quick and dirty example, those are not the real keys and in my case string1 and string2 are both encrypted keys/hashes/whatever. $\endgroup$ – TeKa462 Mar 5 at 16:40
  • $\begingroup$ Well, for a reused key in a XOR cipher you can simply tell that $c_1 \oplus c_2 = p_1 \oplus p_2$ but that should not be news to anybody who studied a bit about one-time-pads. If they are both ciphers over the same plaintext then the key has changed two bits instead. $\endgroup$ – Maarten Bodewes Mar 5 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.