Didactic Scrambled Egg Cipher Pre-Warmup

Discussion of challenges you have already solved
Post Reply
tails
Posts: 191
Joined: Tue Jun 10, 2008 7:51 pm
Location: Tokyo

Didactic Scrambled Egg Cipher Pre-Warmup

Post by tails »

I think there is an unintentional bug in it.
snibril wrote:I think there is an error in the line
eggs ^= (key[eggs&0x4]<<8);
It should be
eggs ^= (key[eggs&0x3]<<8); ?
It seems the text is actually encrypted with the former expression. That means that the key consists of two bytes, one key[0] and the other key[4].
macz
Posts: 5
Joined: Sat Oct 25, 2008 11:12 am

Post by macz »

yep - which makes it quite more easy to solve :)
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

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

Post by MerickOWA »

adum wrote:whoops, fixed =/
ha, not before i solved the broken one! ;)
User avatar
lamedog
Posts: 3
Joined: Mon Jul 25, 2011 12:00 pm

Post by lamedog »

My brute force solution takes like years to give the answers!

my solution; (the real code is too long too ugly and too twisted):

Code: Select all

cipher = '9488818...'
for each key in range(256, 256, 256, 256)
     is_good_key = True
     plain = ""
     for each triple_char in cipher
         plain += unscramble(triple_char, key)
         if non_printable_char in plain
             is_good_key = False
             break
     if is_good_key
         print(plain, key)
I wonder if there is a way to solve it like in a seconds...???
Has someone found a weakness in the algorithm or a trick to speed up the cracking?
portal
Posts: 19
Joined: Sun Jul 22, 2007 4:36 am

Post by portal »

it has been some time ago, but I think I did it by hand.
it took a while, but not years...
P€P€
Posts: 1
Joined: Wed Nov 03, 2010 11:37 am

Post by P€P€ »

lamedog wrote: I wonder if there is a way to solve it like in a seconds...???
Has someone found a weakness in the algorithm or a trick to speed up the cracking?
My solution got it in a few seconds.
The weakness is that you only need one round to reproduce one of the 3 bytes of the plain text.
LeSingeMalicieux
Posts: 4
Joined: Fri Aug 31, 2012 10:13 am
Location: France

Post by LeSingeMalicieux »

Great Challenge !!! I did not think to pass it, but I had :D

My idea was to search for the 3-byte tuples which have could been encrypted thrice with the same one-byte key.
The ones which seems to be parts of a three letters of en english plaintext was encoded with key[0]=33 (in hex).

Then, I have repeated my researches knowing key[0] to find others bytes of the key.

I did it with Excel :roll:

But this method seems to be not usefull with next challenge...
I am french, so I am sorry for my poor english :(
AgRaven
Posts: 13
Joined: Sun Feb 24, 2013 8:27 am

Post by AgRaven »

Ahhh, snap... that was satisfying to solve. Very nice one adum, once again I learned a bunch.

Using letters to represent bits for each byte: aaaaaaaabbbbbbbbcccccccc, I spent ages trying to solve for c. As pepe suggests, that's the wrong byte's bits to go for. Makes it simple to restrict keys tested and evaluate output 1 at a time.

Onto the warmup then...
so1us
Posts: 4
Joined: Wed Sep 01, 2010 5:30 pm

Post by so1us »

nice challenge that was.
the problem was not to compute all 256^4 possibilities, but to find the right one.
first i tried to list those with the most letters, but nothing meaningful there. (yes, because i forgot the spaces)
then i searched for strings with "answer" in them, both capital and small letters mixed. quite a few there.

the string that caught my attention:

Code: Select all

i'M gOnna`cT!bT`oFf widH`q.ic%0pieCe o&0teht. 'A Gui tld m%0h%0l)kEd cheR2ie3...bu4... I wAitE$0to seu ivhuwas gOnna sA90Toma4o.n.beforu I R%ql)zE$0h%0l)kEs cheR2ies j5ctn..!lRiwHt< 4hat j/ke`iS rI$iculous. DHat30l)kE`qcar"on cOpiov 4he pRevious`jOku bet wItx differe~t iNgre$ients. I dOn7t kNog 7hat I wA30t2yinw t peLl ofv 4here.' okayl0thuanSwer wOu|d bE dH%0l!cT nAmu ov 4he aU4hor o&0t(qT qUote. y%c,`yOu mainee$0to Googlu it
some weird form of 1337 i thought..

I got the answer from this, only to find that the real text was computed just after this crap

anyway, congrats to the author, i liked this one
Post Reply