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].snibril wrote:I think there is an error in the line
eggs ^= (key[eggs&0x4]<<8);
It should be
eggs ^= (key[eggs&0x3]<<8); ?
Didactic Scrambled Egg Cipher Pre-Warmup
Didactic Scrambled Egg Cipher Pre-Warmup
I think there is an unintentional bug in it.
My brute force solution takes like years to give the answers!
my solution; (the real code is too long too ugly and too twisted):
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; (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)
Has someone found a weakness in the algorithm or a trick to speed up the cracking?
-
- Posts: 4
- Joined: Fri Aug 31, 2012 10:13 am
- Location: France
Great Challenge !!! I did not think to pass it, but I had
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
But this method seems to be not usefull with next challenge...
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
But this method seems to be not usefull with next challenge...
I am french, so I am sorry for my poor english
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...
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...
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:
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
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
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