hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Didactic Scrambled Egg Cipher
Goto page 1, 2  Next
 
Reply to topic    hacker.org Forum Index » Challenges View previous topic
View next topic
Didactic Scrambled Egg Cipher
Author Message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Didactic Scrambled Egg Cipher Reply with quote
The challenge text is incomplete, unless the problem is to unscramble the pseudocode Wink
Tue Oct 21, 2008 4:22 pm View user's profile Send private message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
heh ok, I see the problem now, actually, if you leave it the way it is, it might be more 'interesting' (depending on your browser ofcourse)

the flip array isn't defined, and unless its a bug they key variable is never used.
Tue Oct 21, 2008 6:20 pm View user's profile Send private message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
maybe it would be better if you posted the encryption algorithm in a language like java or something so that you can be assured that questions about exact byte order or custom arrays are easily answered.

As these problems get more complicated, I can see it getting harder to explain the algorithm without just giving all the details of each function or line of code.
Tue Oct 21, 2008 6:26 pm View user's profile Send private message
tails



Joined: 10 Jun 2008
Posts: 191
Location: Tokyo

Post Reply with quote
key is a 16-byte value and flip has 16 elements, so flip[i] are 8-bit independent values ...?

If so, this challenge should be very tough!
Tue Oct 21, 2008 8:44 pm View user's profile Send private message
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
tails wrote:
key is a 16-byte value and flip has 16 elements, so flip[i] are 8-bit independent values ...?

If so, this challenge should be very tough!


O that seems very likely. Yea, this will be an extremely difficult challenge. 128 bits of possibilities ><. Maybe at least could we hope that flip is some permutation of the 0-15 (meaning no repeats or duplications of numbers)
Tue Oct 21, 2008 10:17 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 392

Post Reply with quote
sorry about the mess... added that one late last night while tired, and didn't check it thru carefully.

should be better now. flip was meant to read 'key'.

good luck!

adum
Tue Oct 21, 2008 11:14 pm View user's profile Send private message Visit poster's website
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
adum wrote:
sorry about the mess... added that one late last night while tired, and didn't check it thru carefully.

should be better now. flip was meant to read 'key'.

good luck!

adum


Is it safe to assume that "print eggs;" prints out a hex encoded number with the most significant byte (of the three) first?

Or to put it another way, is the first encoded "eggs" 0x0043ed82 or 0x0082ed43?

Also just to be clear on "for (int eggs = {each 3-byte tuple in plaintext})"

If the plain text bytes were (in order from least significant to most significant) {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, ... }

would eggs start off being 0x00ccddaa the first time around and 0xffeedd the second time around?
OR
would eggs start off being 0x00ccddaa the first time around and 0xddccbb the second time around?
Wed Oct 22, 2008 4:15 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 392

Post Reply with quote
Quote:

Is it safe to assume that "print eggs;" prints out a hex encoded number with the most significant byte (of the three) first?


yes.

Quote:

Also just to be clear on "for (int eggs = {each 3-byte tuple in plaintext})"

If the plain text bytes were (in order from least significant to most significant) {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, ... }

would eggs start off being 0x00ccddaa the first time around and 0xffeedd the second time around?
OR
would eggs start off being 0x00ccddaa the first time around and 0xddccbb the second time around?


eggs would first be 0x00aabbcc, then 0x00ddeeff. and there is no feedback between the first tuple and the second.
Wed Oct 22, 2008 7:44 pm View user's profile Send private message Visit poster's website
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
I really don't see much hope of this problem being solved ><

I'm not even sure I could solve the problem if i knew the first half of the sentence! Wink

Possibly if LOOP wasn't so high, and there wasn't several bytes of key overlapping each bit of the "egg" variable, it might be possible.

This is one evil problem! Wink
Wed Oct 22, 2008 9:27 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 392

Post Reply with quote
in the original cipher, the LOOP was 1000 =)

i played around with it. at lower than 10, it barely looked scrambled. i guess i can put on a simpler version just for people to get their feet wet...
Wed Oct 22, 2008 9:57 pm View user's profile Send private message Visit poster's website
falcon2424



Joined: 30 Apr 2007
Posts: 30

Post Reply with quote
I don't know if figuring this out is part of the challenge, but how are you defining the << and >> operators?

I'm assuming that they're just left and right shifts, where zeros are inserted when new bits are required, but I want to double check. (Wiki says that '>>' is implementation defined)
Wed Oct 22, 2008 10:23 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 392

Post Reply with quote
Quote:

I don't know if figuring this out is part of the challenge, but how are you defining the << and >> operators?

I'm assuming that they're just left and right shifts, where zeros are inserted when new bits are required, but I want to double check. (Wiki says that '>>' is implementation defined)


just so: like in C.
Wed Oct 22, 2008 11:05 pm View user's profile Send private message Visit poster's website
therethinker



Joined: 28 Mar 2008
Posts: 144
Location: #hacker.org on Freenode

Post Reply with quote
I'm with MerickOWA on this one, its looking pretty tough. I can't believe this is the "warmup"! Shocked

The only solace I can find is that you're given every 1 in 3 key "code nibbles", and a single bit of another.

Overall, I'm loving these didactic challenges (especially since crypto is a bit of a weak spot for me) Although, you might want to start moving somewhere else Wink There's all those castles/forts down at the bottom that might be worth invading Very Happy
Sat Oct 25, 2008 1:48 am View user's profile Send private message AIM Address
MerickOWA



Joined: 07 Apr 2008
Posts: 182
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post Reply with quote
therethinker wrote:
I'm with MerickOWA on this one, its looking pretty tough. I can't believe this is the "warmup"! Shocked

The only solace I can find is that you're given every 1 in 3 key "code nibbles", and a single bit of another.

Overall, I'm loving these didactic challenges (especially since crypto is a bit of a weak spot for me) Although, you might want to start moving somewhere else Wink There's all those castles/forts down at the bottom that might be worth invading Very Happy


Yea, and I'm having a hard time even knowing that to figure out the key. I think i've got about 14 out of the 128 bits, and anytime I try to guess at the others, it never makes any sense.
Sat Oct 25, 2008 5:20 pm View user's profile Send private message
therethinker



Joined: 28 Mar 2008
Posts: 144
Location: #hacker.org on Freenode

Post Reply with quote
You can also make confident guesses for several more.

This challenge is looking to be more paper & pencil, or at least a significant portion of it.
Sat Oct 25, 2008 7:48 pm View user's profile Send private message AIM Address
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Challenges All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.