2010/03/08

Exhilerating!

I'm totally pumped right now.

You know that geeky stick man comic that I occasionally post?  It's from a website called "xkcd.com".  Comics are published a few times a week, and they are typically very geeky math/science/physics/coding kind of stuff.  Usually funny, but sometimes romantic, heartbreaking, and introspective.

Around the holiday season, I noticed that he sold stuff.  Autographed strips, clothes, and so forth.  I bought a couple autographed prints (he adopted the Radiohead "name your own price model", which was pretty cool), as well as a book that was a collection of comics, a la Calvin and Hobbes.

In the book, to my surprise, were not only comics, but lots of fun little notes.  As well as puzzles.  Lots of things that looked like binary and hex and weird images and stuff.  There was clearly a treasure hunt hidden in the book.

There have been lots of puzzles like this.  Things are just kind of dropped on the public, and everyone kind of gathers online in a forum or something and works them all out.  I love this kind of thing, but I'm always late on board, so everything is always figured out by the time I even learn the thing exists.

So, by now, I figure the game is already over.  But I decided to work on some of the puzzles myself, and see if I can do it alone.  I solve a couple of the easier ones, but soon get pretty stumped.  Searching online, I see a forum where people have started posting questions and answers and solutions.  I cautiously read, trying to get hints without learning too much.  Soon enough, I throw caution into the wind and read the entire set of posts.

What I learn (and some of which I already knew) was that there is an encrypted message.  And to decrypt it, you need the key.  And the key has been divided into eight parts, and each part is a puzzle in the book.  So, solve all the puzzles, get the eight parts to the key, and decrypt the text.

By looking at the forum posts, the last post was about two weeks ago.  So far, it appears that seven out of the eight puzzles have been solved, yielding most of the key.  Some industrious folks started brute-force hacking to try to guess the remaining key (really just a number between 0 and about 4.2 billion), but apparently never succeeded.

So there was still some real work left to do!

The final puzzle was simply a little picture on a random page:



It kind of reminded me of a new-style UPC or barcode (like you might see on a FedEx package).  It also reminded me of some puzzles from the great game "The Fools Errand" (a must if you like puzzles).  In those puzzles, you removed some of the blocks, leaving others, and it finally spelled out a word, graphically.

Other people were doing what I did at first, which was convert the image into binary (where a 1 means a red pixel, and a 0 means a white pixel).  If you do that, you get this:


10111110101111110111111
11111111101011110100001
10111111111111111010100
11011001001001001010111
01100101011110100000001
01101110101100111111111
10111101011011110111110
01111111111010100100001
10111111111111001101111


The reason for doing this kind of conversion is that 1's and 0's can be used to create numbers, and numbers can be used to look up letters in a standard kind of lookup table.  So that approach makes some sense.

Now, there was one other piece of the puzzle.  There was a comic in the book that talks about factoring.  In the original online comic, the character talks about factoring a number into it's prime factors.  The book version is different.  In the book, the character uses a different number:  207.  207 is 3x3x23.  It just so happens that the image above has 23 pixels across and 9 pixels down.  So a connection is made there.

What I wanted to do was arrange the block of pixels into 3x3 blocks (23 of 'em).  To do this, I concatenated (joined) the first three lines, the second three lines, and the last three lines together.

101111101011111101111111111111110101111010000110111111111111111010100
110110010010010010101110110010101111010000000101101110101100111111111
101111010110111101111100111111111101010010000110111111111111001101111

Now I added spaces to make 3x3 blocks.

101 111 101 011 111 101 111 111 111 111 110 101 111 010 000 110 111 111 111 111 111 010 100
110 110 010 010 010 010 101 110 110 010 101 111 010 000 000 101 101 110 101 100 111 111 111
101 111 010 110 111 101 111 100 111 111 111 101 010 010 000 110 111 111 111 111 001 101 111


I wondered if something was written out.  I looked at the first block of 1's and 0's.  It kind of looked like a K.  The next one could make be an E.  The third was could be a Y!  KEY!  Holy fucking balls, I might have solved it!


I replaced 1's with X's and 0's with spaces:




X X  XXX  X X   XX  XXX  X X  XXX  XXX  XXX  XXX  XX   X X  XXX   X      XX   XXX  XXX  XXX  XXX  XXX   X   X
XX   XX    X    X    X    X   X X  XX   XX    X   X X  XXX   X           X X  X X  XX   X X  X    XXX  XXX  XXX
X X  XXX   X   XX   XXX  X X  XXX  X    XXX  XXX  XXX  X X   X    X      XX   XXX  XXX  XXX  XXX    X  X X  XXX


From there, I could read it.  KEY SIX OF EIGHT: D0E0C9A6

(I know this is hard to read.  I can't format it properly in Blogger, but it stood out very clearly in Notepad).

WOW!

Not only had I solved one of the keys, but I now was the only person in the world (as far as I know), who now knew ALL the keys!

I figured out how to stick all the keys together and decipher the text, and posted my results on the web forum for the world to see.

I know it's lame, but my heart was pounding when I read that final key and did the decryption work.  It was really exciting to have figured out the answer and post the results.

The final decoded message?  A date and time and GPS coordinates that correspond to the middle of Golden Gate park in San Francisco.  It's a Saturday in June, and I'm actually tempted to see if I could make it up there for the day...

Anyhoo, exciting stuff (for some definitions of "exciting" I suppose).

4 comments:

Unknown said...

Woot! That is awesome! Well done by you... That's really cool stuff.

Anonymous said...

Dude, I can't believe you didn't keep the answer and the millions of dollars that will be waiting in Golden Gate Park for yourself, bad move, but good brains by you anyway.

Iwan

Adman said...

Dammit!

Gabriel said...

Super cool. Now I understand what Norm was talking about on Tuesday night. I just thought he was acknowledging your day to day brilliance.

So what kind of props did you get on the forum? Or were people pissed that you solved the puzzle for them?