Didactic XOR Cipher 3

MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Didactic XOR Cipher 3

Post by MerickOWA »

Having a bit of confusion understanding the 'x' parameter.

Is this a constant? Or does this change? Or is this question part of the challenge? ;)

Edit: I've come to the conclusion that either 'x' isn't constant or theres more to the challenge than it states ;)
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

'x' is a constant. it is 'b' that changes after each enciphered byte. i'll try to think of a better way to explain this one. since it has been solved, at least i know it's doable however =)

adum
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

Hrm, thats how i interpreted it the first time. I think my assumptions about what kind of data this is might be incorrect then.

No combination of b and x produced anything I recognized anyway ;)
Shirkit
Posts: 2
Joined: Thu Oct 09, 2008 2:15 pm

Post by Shirkit »

Hint: OR AND NOT...
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

I decoded part of it, but not the answer. It does look a bit broken... some challenges might be intentionally easy to partially decode, but from the description of this one I wouldn't have expected that.

I have found that the Didactic Long XOR challenge has a similar fault, although I solved that one. I wondered whether it was a typo in the ciphertext.
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

since tails solved the XOR 3, i don't think there's a mistake.

i think what happens is that because this 'cipher' is so weak, you can get values for x that decode some of the text but not others. for a real cipher like AES, it's an all-or-nothing proposition.

adum
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

gfoot wrote:I decoded part of it, but not the answer. It does look a bit broken... some challenges might be intentionally easy to partially decode, but from the description of this one I wouldn't have expected that.

I have found that the Didactic Long XOR challenge has a similar fault, although I solved that one. I wondered whether it was a typo in the ciphertext.
Yea i see what you mean.

Edit: I've almost figured out whats wrong with Didactic Long XOR challenge. I'll send adum a pm when i figure it all out.

Edit: Solved Didactic Long. Not going to post exactly whats wrong with it, as it might make the problem more interesting ;)
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

whoops, i messed up! the didactic long and XOR 3 should be fixed now. sorry about that!

thanks to merrickowa and tails for the corrections.

the _really_ sick part is that people solved these even in the broken state. especially on XOR 3, that is just insane.

thanks,
adum
tails
Posts: 191
Joined: Tue Jun 10, 2008 7:51 pm
Location: Tokyo

Post by tails »

I didn't notice these posts!
adum wrote:since tails solved the XOR 3, i don't think there's a mistake.
Please count me out next time! :D

As MerickOWA and gfoot should have done, 'x' could be easily found anyway. So, with some try-and-errors, it was not so insane to solve it once you discover how it was broken. 'b' doesn't matter; it has only 256 possibilities. :wink:

But it's funny that I cannot solve 'Broken XOR 3' so far ... :lol:
canine
Posts: 190
Joined: Sun Sep 14, 2008 5:38 am

Post by canine »

tails wrote:I didn't notice these posts!
adum wrote:since tails solved the XOR 3, i don't think there's a mistake.
Please count me out next time! :D

As MerickOWA and gfoot should have done, 'x' could be easily found anyway. So, with some try-and-errors, it was not so insane to solve it once you discover how it was broken. 'b' doesn't matter; it has only 256 possibilities. :wink:

But it's funny that I cannot solve 'Broken XOR 3' so far ... :lol:
Sure, but if I'm understanding the problem correctly, and there is a significant chance that I'm not, b can be any 8 bit number. So if b can range from 0-255, and so can x, then we have 65536 possibilities, too many to sift through to find the answer.

If I am missing something, or someone has a hint for me, it would be greatly appreciated.
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

canine wrote:
Sure, but if I'm understanding the problem correctly, and there is a significant chance that I'm not, b can be any 8 bit number. So if b can range from 0-255, and so can x, then we have 65536 possibilities, too many to sift through to find the answer.

If I am missing something, or someone has a hint for me, it would be greatly appreciated.
Actually, its not too bad to do. I attempted writing a program that went through all 65536 possibilities and then did a quick check of the string to see if it had good data.

So far tho, either my program is wrong, or my assumptions about the data is wrong because I haven't been successful on decrypting it ><
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

okay, i messed up again! i was modding by 255 instead of 256. whoops. didactic XOR 3 and broken 3 are now fixed... sorry

adum
tails
Posts: 191
Joined: Tue Jun 10, 2008 7:51 pm
Location: Tokyo

Post by tails »

adum wrote:okay, i messed up again! i was modding by 255 instead of 256. whoops. didactic XOR 3 and broken 3 are now fixed... sorry
And the _really_ sick part is that gfoot solved it even in the broken state, that is just insane. :D
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

canine wrote:If I am missing something, or someone has a hint for me, it would be greatly appreciated.
It's not a large search space, and it's easy to scan the results for things that might be correct. I think most of us tripped up on the fact that none of the results actually look correct to begin with!

That said, I used a state-of-the-art pattern-recognition device coupled to optical sensors to scan the search space more efficiently, reducing it to O(n log n) rather than O(n^2).

Unfortunately the pattern-recognition device is slower than brute-forcing it, and relatively expensive to run, but (much like Mortal Coil) it's more fun that way. :)
gfoot
Posts: 269
Joined: Wed Sep 05, 2007 11:34 pm
Location: Brighton, UK

Post by gfoot »

tails wrote:And the _really_ sick part is that gfoot solved it even in the broken state, that is just insane. :D
Well, the funny thing is, I was trying a 255 modulus on the old broken version, because I wasn't sure what was wrong with it (especially what could cause me to decrypt the end of the message perfectly but not the start). I'd left my solver with the wrong modulus, though, when the fixed challenge went up, and didn't notice until I'd already solved it.

No doubt there'll be another variant of the challenge up soon, where you also need to figure out the modulus. The interaction between x and m has interesting effects.
Post Reply