The Nightstar Zoo

Nightstar IRC Network - irc.nightstar.net
It is currently Thu Oct 19, 2017 5:38 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Binary Cipher!
PostPosted: Wed Mar 26, 2003 12:31 am 
Offline
Knight of Daisies, Tulip Slayer
User avatar

Joined: Sat May 11, 2002 3:03 am
Posts: 1621
Location: Sector ZZ9 Plural Z Alpha
During the recent cipher convention, a binary code contest took place. The contest consisted of a binary code transmission where the spaces between the letters were missing and there was no punctuation. Each letter of the alphabet was translated into its binary equivalent based on its position in the alphabet, a=1, b=10,...,z=11010. What is the answer to the question being asked?
Code:
110011101001000100110011100110011110110
101100101100110010011101101001111010111
001010010000101011101011010110010110011
010010001111101011111000101001001101001
011111111010111001001000101110010000100
111010011100111011101100110011100111011
000011001011000110101101100111010010011
111111010111100011010010011001111111110
101100001100101011001111111110101

_________________
Fandemonium 2010 -- No Boundaries.
http://www.fandemonium.org
Friday - Sunday, August 6th - 8th, 2010
Nampa Civic Center - Nampa, Idaho (Only 20 minutes from the airport!)
(Idaho: It ain't just potatoes anymore.)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2003 3:38 am 
All I could deduce is that no letter can start with a 0, and that all instances of 10000 will be P.


Top
  
 
 Post subject:
PostPosted: Wed Mar 26, 2003 4:40 am 
The answer to the question is... 2

10000 is P, so that's a good delimiter, using that you can break it up into 5 sub-strings. the more 0's you have lined up, the easier it is to figure it out.

Past that, it's a matter of trying combinations, and looking for ones in the dictionary. (and/or using humans as pattern matching computers.)


Top
  
 
 Post subject:
PostPosted: Sun Mar 30, 2003 12:50 am 
Nobody going to comment? Anyone else get the cypher?


Top
  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 2:30 pm 
I've not had the time to try it yet...

Sometime this week.


Top
  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 3:20 pm 
Offline
Vorpal Bunny Slipper
Vorpal Bunny Slipper

Joined: Sun May 12, 2002 2:54 am
Posts: 2707
I'd take a shot at it if I had the free time and brainspace to devote to it.

_________________
Scharr, scharr, verscharr das Gebein, grab es tief unten im Keller ein.
Später dann graben es andere aus, und nennen dein Haus das Knochenhaus.
Scharr, scharr, verscharr das Gebein, leg auch ihre weißen Schädel hinein.
Mit Beton gießt du es aus, das Fundament vom Knochenhaus.
Scharr, scharr, verscharr das Gebein, da ist noch Platz, da paßt noch wer rein.
Hier tobte sich der Teufel aus, unten im Keller im Knochenhaus.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 3:50 pm 
Offline
Energizer Bunny
User avatar

Joined: Wed May 22, 2002 12:24 am
Posts: 1634
I'm working on it. So far I've found that there are 21 locations where you start a letter in the same place in all someodd-E+43 possible groupings. One is the start, one is the end, there are four P's, two guaranteed H's, one guaranteed D, and one guaranteed A (at the very end of the string). The hardest block is 41 bits long, containing as few as 10 or as many as 25 letters, with 1,335,510 different possible combinations, starting with D, I, or S. That starts at bit 193, and is followed immediately by a P. More when I get home, probably.

Vorn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 5:15 pm 
I agree with (and had confirmed independently) Vorn's analysis on all but one point. I don't follow how there could possibly be a guaranteed A at the end of the string. In fact, I highly doubt this is the case.

The first thing I did was convert the binary into the maximum number of letters it could represent. This converted everything into the alphabet ABDHP.

I got the following code: (I used the spaces to determine where zeros were removed)

Code:
AD  AAB D  H   D  AD  AAD  AD  AAAB AB  B AD  B AD  A
D  D  AAB AB D  AAAB B AAD B D   P B B AAB B AB B A
D  B AD  AB  D  H   AAAAB B AAAAH   B D  D  AB D  B
AAAAAAAB B AAD  D   H   B AAD  P    D  AAB D  AAD  AA
B AAB AD  AD  AAD  AAB A P    AD  B AH   AB B AB AD  A
AB D  D  AA AAAAAB B AAAH   AB D  D  AD  AAAAAAAAB
B A P    AD  B B AD  AAAAAAAAB B A


Next, came the brute force algorithm. At the bottom is the python script that I used to enumerate all possible words that could come out of a given section of this code. I used the four 'P's and the two guaranteed 'H's that Vorn described, as well as the beginning and end of the code as anchors; as they are the only points which we know for certain aren't breaking a letter. I was able to power out three sections of the code which are 'very likely' candidates.

At the beginning and passing through the first 'H', I have:
110011101001000100110011 = "ASTHIS"
In the middle where a P and H are near eachother, I have the following:
1000101110010000 = "HELP"
And from the last 'P' to the end of the string, I have this:
100001100101011001111111110101 = "PLUSONE"

My method involves looking at all possible combinations and trying to come up with one that makes sense. I'll give somebody credit for coming up with a better method. Until then, brute force methods, though terribly inefficient, always work eventually. ;)

Code:
import sys
map = {'A':'A', 'B':'B', 'AA':'C', 'D':'D', 'BA':'E',
 'AB':'F', 'AAA':'G', 'H':'H', 'DA':'I', 'BB':'J', 'BAA':'K',
 'AD':'L', 'ABA':'M', 'AAB':'N', 'AAAA':'O', 'P':'P',
 'HA':'Q', 'DB':'R', 'DAA':'S', 'BD':'T', 'BBA':'U',
 'BAB':'V', 'BAAA':'W', 'AH':'X', 'ADA':'Y', 'ABB':'Z'}

def binmap(str, prefix=''):
    f = 1
    for x in map.keys():
        if str.startswith(x):
            binmap(str[len(x):], prefix + map[x])
            f = 0;
    if f: print prefix + str

binmap(sys.argv[1])


Top
  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 5:24 pm 
Offline
Energizer Bunny
User avatar

Joined: Wed May 22, 2002 12:24 am
Posts: 1634
Okay, I see what I did wrong with the last A -- I'd forgotten that the end of the string doesn't have a 1 after it to say "this is an okay letter."

Vorn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 6:12 pm 
Offline
Energizer Bunny
User avatar

Joined: Wed May 22, 2002 12:24 am
Posts: 1634
10100101111111

Vorn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 6:21 pm 
Vorn and I worked this out together. I had posted the full answer here, but was informed people are still working on it, so I deleted it.

I would have put it in spoiler tags, but I need to use code tags, and they don't nest well. So I'll wait until I get some sort of all clear signal.

-Pi


Top
  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 11:42 pm 
Nod, I only posted the Answer to the problem, not the decrypted text.
I'll email you my answer to see if we match here. (in the form of the very primitive python script I used for brute-forcing it.)


Top
  
 
 Post subject:
PostPosted: Sat Apr 05, 2003 11:12 am 
Well, I started playing around with it - used my human pattern recognizer, and suddenly the last part of the question - starting with a Q - just appeared to me. So it becomes apparent what the preceding words need to say.


Top
  
 
 Post subject:
PostPosted: Sat Apr 05, 2003 11:26 am 
Done!

Well, as you can probably see by the timestamps, the rest of the puzzle just fell out.

Total time for parsing: 20 minutes or so. Definitely quicker than it would have been for me to write a program and check combinations.


Top
  
 
 Post subject:
PostPosted: Sat Apr 19, 2003 2:18 am 
For me, the program was the easy part. It only took 15ish minutes.

It was stepping it through the array and looking for words that took awhile. :)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group