Didactic XOR Cipher 2

Post Reply
johnpatcher
Posts: 6
Joined: Tue Oct 26, 2010 6:34 pm

Didactic XOR Cipher 2

Post by johnpatcher »

Hi,

I'm probably overlooking something or misinterpreting the text, therefore I've to ask you for further advices.

What I've done so far. I suppose that the hex encoded string is encrypted the same way as in "Didactic XOR Cipher 1", so I've decrypted it in the same way.

The text now says that each character has been xor'd by a byte. I suppose this means that each character is xor'd with the same byte. as it would be an one time pad otherwise, which is proven to be unbreakable, isn't it?

As a byte can store 8 bits, there are only 8 possible keys? I've tried every one of these 8, and couldn't find a suitable solution.

I'm now supposing that I've done something wrong, but can't imagine what that could be. Any clues would be appreciated.
HugStuart
Posts: 13
Joined: Sat Oct 25, 2008 4:51 pm

Re: Didactic XOR Cipher 2

Post by HugStuart »

johnpatcher wrote:Hi,
The text now says that each character has been xor'd by a byte. I suppose this means that each character is xor'd with the same byte. as it would be an one time pad otherwise, which is proven to be unbreakable, isn't it?
Right
johnpatcher wrote: As a byte can store 8 bits, there are only 8 possible keys? I've tried every one of these 8, and couldn't find a suitable solution.
One byte can store 8 bits, this leads to 256 different keys: 00000001, 00000010, 00000011, ..., 11111110, 11111111
johnpatcher
Posts: 6
Joined: Tue Oct 26, 2010 6:34 pm

Re: Didactic XOR Cipher 2

Post by johnpatcher »

HugStuart wrote:One byte can store 8 bits, this leads to 256 different keys: 00000001, 00000010, 00000011, ..., 11111110, 11111111
Sorry, I meant 256. I've looked over all of them, and couldn't find anything that makes sense at all :(.
HugStuart
Posts: 13
Joined: Sat Oct 25, 2008 4:51 pm

Re: Didactic XOR Cipher 2

Post by HugStuart »

johnpatcher wrote: Sorry, I meant 256. I've looked over all of them, and couldn't find anything that makes sense at all :(.
Did you XOR the whole message for each byte and converted it to char?
johnpatcher
Posts: 6
Joined: Tue Oct 26, 2010 6:34 pm

Post by johnpatcher »

Ok, got it, had a mistake in my program :(. Don't know whether this thread spoils too much?
hughr2005
Posts: 4
Joined: Thu Jan 14, 2010 12:50 pm

Using Perl

Post by hughr2005 »

Hey,
I'm using perl, and I've generated a list of the hex number xor'd as above with each number up to 256. The list is printed in decimal, but now I'm wondering if there's a way to convert each number to characters? I presume it uses ascii, but I can't find a way of converting the numbers to ascii characters. Is there a method in perl, or will I have to switch to some other language like ruby to interpret the data?
Thanks
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

"perldoc perlfunc" and search for the chr function.
kamikataz
Posts: 2
Joined: Fri Feb 12, 2010 3:56 pm

got it but still :(

Post by kamikataz »

hii, i got the key , have the text decrypted but still answer is not accepted in any form ,,

the " starts but do not ends, which portion is the answer??

what i got is like

xxxxxxxxxxxxxx "xxxbhbjh xxxxxxxxxx

where "xxxbhbjh is a combination of 2-3 english words english word rest is all in english.

please help ....
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Re: got it but still :(

Post by laz0r »

kamikataz wrote:hii, i got the key , have the text decrypted but still answer is not accepted in any form ,,

the " starts but do not ends, which portion is the answer??

what i got is like

xxxxxxxxxxxxxx "xxxbhbjh xxxxxxxxxx

where "xxxbhbjh is a combination of 2-3 english words english word rest is all in english.

please help ....
PM me with your solution and I'll tell you. (I have solved it already, btw :P )
There is no spoon.
meis
Posts: 16
Joined: Tue Aug 28, 2012 5:22 pm
Location: Italy

Post by meis »

I have a problem, i'm doing this w/ PHP, like about every other challenge.
My script does the following:
for every char of the string, it converts in base 2 (binary) and xores it with 79 in base 2, then converts the result in base 16 and concatenates them. It gives me a string (27112711274e2710274f272712112711271027102710), but it's not correct.

Where have I mistaken (and does "to mistake" exists in english?)? xD

EDIT: I just noticed, I was talking about didactic XOR 1, i was writing in the wrong topic... I'm a little too old for this xD
Post Reply