views:

266

answers:

4

i am new to xor encryption and the task i have uses five bits not ascii. how do i break it?am looking for a concrete example of breaking.

+4  A: 

Well, you can't, you need to do statistical analysis on it.

You also need to know the key length, and make sure that the key length is shorter than the plaintext length, or you have a One-Time Pad, and that is unbreakable.

Noon Silk
A: 

well the system indeed uses a repeated key.by that i mean its not a one time pad. key is an English word(s).what i have so far is to xor the cipher text with itself shifted a couple of time and the shift that gives me 6% of my text the same is probably the key length. how to move from this step to determining the actual key is what i don't get.

Then try the dictionary words which have the same length that your key is supposed to have.
Piskvor
+1  A: 

For something this simple, brute force will probably work the best. Write a program that just keeps adding to the xor key and looking for plaintext.

hova
A: 

its difficult to picture something working cause as i said am really new to this stuff.some of the code i have to break is over 2000 bits long. a real (sketch) would do. may be am also at a disadvantage cause the programming language i have learned so far is first steps in c++.

i have some code which are very short say 150 bits long.does the brute force work for short one like this?cause i cant see a pattern or should i concentrate on the long ones first.

what about if i do a replica of the histogram thing as its done with the vegenere.say i know the key length, i make rows(size of key length).i put the 5-bits as they appear by their frequencies in the rows. this other guy was saying the most frequently appearing in that particular row should be xored with space(cause its the most used thing when writing in english).my ciphertext does have spaces.i have tried xoring with 'e=00100' the mostly used character in english but it didn't work. where am i not getting it? does it mean for all the rows i should xor with 'e' or at some point i should change?