# File using same key on XOR cipher. Using CBC [closed]

I have some files that are encrypted using an unknown key and it's using the CBC method to encrypt the files.

When I XOR two files together the first two bytes are always the same, but different for each files (make sense for each file)

From that is it possible to recover the real key? First bytes of the file :

1a 1a 14 54 08 0b 02 59


When xoring it to a another file using the same key the first few bytes are :

3a e5 1f 01 3a e5 1f 01


Another beginning of xoring with different file

bf fb 22 10 bf fb 22 10


As you can see the pattern repeats for those only 8 bytes. It does that for every file that I xor. Does that mean the key length is 4? And from that how can I recover the text ?

## closed as off-topic by otus, e-sushiApr 8 '16 at 19:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Requests for analyzing or deciphering a block of data are off-topic here, as the results are rarely useful to anyone else." – e-sushi
If this question can be reworded to fit the rules in the help center, please edit the question.

• You say "XOR cipher" and use stream-cipher, but also say CBC. Which cipher is really used? AES-CBC? I don't see a pattern, but a pattern in the beginning would likely have to do with IV generation. – otus Apr 8 '16 at 7:25
• The file was encrypted using only XOR nothing else with CBC technique where you used previous block to encrypt the next block. – Maxime Roussin-Bélanger Apr 8 '16 at 7:32
• What does "using only XOR" mean? Do you mean $c_i = p_i \oplus c_{i-1} \oplus k$ with a constant key $k$? – otus Apr 8 '16 at 7:52
• More like $c_1 = p_1 \oplus k$ and then $c_i =p_i \oplus c_{i-1}$ – Maxime Roussin-Bélanger Apr 8 '16 at 11:42