Can you break my code?

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Can you break my code?

Postby Klotz » Sat Oct 31, 2009 4:02 pm UTC

I came up with this code when I was bored and wrote a little program to implement it. Can anyone break it? I'll post a large passage in coded form. If it's still too hard I'll post some phrases with their coded versions, or something like that.

The uncoded version of the following is in all caps, with no spaces or punctuation. I added some spaces to break it up so it wouldn't fuck up the forum, but it's continuous.

JOHXFZYIEOWXRFUHFETHVJQGPUFNDRICOWBKTPGKDLRKMUIZQPTNLNHWXRLOBYQEGCCUJL
THYEKRGEEGVIWZUMJBETRADDKZXMVJAFZLGUXRPGZPJDEQERKYJSZYGEBQVHPUHJWUDVJX
OIEWCACWWFDLXLCSOGHVTLJWUNNAZAPDULXFGPEYSIUUVGZRWBXBHQYZIXFKXJVOPGNNTT
HEICOQLRJQGGJHMAOYNPXKODPPWLJYLTRPPXRGHJYAGANPECGAOFWLFZTWLUPPGVTCRFWN
CAECZRUVKEYLLLJXOAAHWUGWWYNPXJSHFUHATXKAJZAQNFBOESFYDOLXXMBPGMFYRQWQZR
XWCWJDHIFKKKXWPTNWDKTQPREKNBSTVKIUDNKMSHJPJFJYPLNBPYNWCIIGNHYPECCEDCBS
KZOICMZXBGHQCOKYXGYMTNENHWXGULKKCQGVTBFFXUIZICUEMUDRIYZBAOEOUTPHROTS
Klotz
 
Posts: 522
Joined: Thu Apr 17, 2008 11:27 pm UTC

Re: Can you break my code?

Postby Klotz » Tue Nov 03, 2009 4:11 am UTC

Did nobody reply because it's too hard or did nobody reply because nobody cares?
Klotz
 
Posts: 522
Joined: Thu Apr 17, 2008 11:27 pm UTC

Re: Can you break my code?

Postby Tharwen » Tue Nov 03, 2009 4:44 pm UTC

Personally, it's too hard. But I still haven't given up and might end up writing some counter-programs to try to decode it.
Cake or Death?
User avatar
Tharwen
 
Posts: 5
Joined: Mon Nov 02, 2009 10:57 am UTC
Location: Elsewhere

Re: Can you break my code?

Postby Puck » Tue Nov 03, 2009 4:52 pm UTC

Essentially, if you used a computer to encode it, it means you most likely need a computer to decode it, and to have any hope of figuring it out based on a small ciphertext, you need to do all sorts of statistical analyses to even determine what type of cipher it is (with a tiny sample size).

Simple substitution ciphers are fun to decode by hand, and maybe some bigram substitution ciphers like Playfair if you have some clue what to expect. Past that, it's a big game of "guess what the encoder was thinking", which I don't find particularly fun.
22/7 wrote:If I could have an alternate horn that would yell "If you use your turn signal, I'll let you in" loud enough to hear inside another car, I would pay nearly any amount of money for it.
Puck
 
Posts: 551
Joined: Tue Nov 27, 2007 7:29 pm UTC

Re: Can you break my code?

Postby Klotz » Tue Nov 03, 2009 8:23 pm UTC

HIHOWAREYOUDOING
codes to
IKKSBGYMHYFPBWCW

That should help.
Klotz
 
Posts: 522
Joined: Thu Apr 17, 2008 11:27 pm UTC

Re: Can you break my code?

Postby JBJ » Tue Nov 03, 2009 9:15 pm UTC

It did.
Spoiler:
Rotate the text of each character. +1, +2, +3, so on and so forth...
The real pain was putting the spaces back in.
I MET A TRAVELLER FROM AN ANTIQUE LAND WHO SAID TWO VAST AND TRUNKLESS LEGS OF STONE STAND IN THE DESERT NEAR THEM ON THE SAND HALF SUNK A SHATTERD VISAGE LIES WHOSE FROWN AND WRINKLED LIP AND SNEER OF COLD COMMAND TELL THAT ITS SCULPTOR WELL THOSE PASSIONS READ WHICH YET SURVIVE STAMPD ON THESE LIFELESS THINGS THE HAND THAT MOCKED THE MAND THE HEART THAT FED AND ON THE PEDESTAL THESE WORDS APPEAR MY NAME IS OZYMANDIAS KING OF KINGS LOOK ON MY WORKS YE MIGHTY AND DESPAIR NOTHING BESIDE REMAINS ROUND THE DECAY OF THAT COLOSSAL WRECK BOUNDLESS AND BARE THE LONE AND LEVEL SANDS STRETCH FAR AWAY

Edit #2:
This is the quick VB Script I wrote to decode it, using the HIHOWAREYOUDOING as an example.
(didn't want to copy and paste the whole Ozymandias text)
Code: Select all
code = "IKKSBGYMHYFPBWCW"
for i = 1 to LEN(code)
   c = ASC(Mid(code, i, 1)) - i - 64
   Do Until c > 0
      c = c + 26
   Loop
   msg = msg &  CHR(c+64)   
Next

wscript.echo msg

Edit - I think a few characters got lost in either my copy/paste or yours.
Last edited by JBJ on Tue Nov 03, 2009 9:44 pm UTC, edited 2 times in total.
SecondΤalon wrote:One's ability to do calculus is inversely proportional to one's ability to kill antelope with lightning from your ass. it's SCIENCE!

Mors aut honorabilis vita
User avatar
JBJ
 
Posts: 345
Joined: Fri Dec 12, 2008 6:20 pm UTC
Location: Space Coast

Re: Can you break my code?

Postby Puck » Tue Nov 03, 2009 9:21 pm UTC

Spoiler:
I think it's "a shatter'd visage"... although "as hat terd" is totally reasonable. :) Good poem, by the way.

By the way, the cipher you used is equivalent to a Vigenère cipher with a keyword of ABCDEFGHIJKLMNOPQRSTUVWXYZ. Actually, for me at least, saying you used a computer program to encode it was a bit of a red herring, as such a cipher is simple enough to encode and decode by hand.


To be fair, I didn't spend any time trying to crack it, but I guess the point I'm trying to make is that with no clues and a small sample text, the process of deciphering essentially involves guessing a deciphering algorithm, trying it to see if it produces anything useful, varying your guess, and repeating ad nauseam until you have deciphered the text or given up. Given this, I'm not sure how to construct a cipher/decipher problem that is interesting for humans to solve - the simple monoalphabetic substitution ciphers are popular, but where do you go from there?
22/7 wrote:If I could have an alternate horn that would yell "If you use your turn signal, I'll let you in" loud enough to hear inside another car, I would pay nearly any amount of money for it.
Puck
 
Posts: 551
Joined: Tue Nov 27, 2007 7:29 pm UTC

Re: Can you break my code?

Postby Tharwen » Tue Nov 03, 2009 9:43 pm UTC

And... here's my (identical) answer, 30 mins late :D

Spoiler:
I MET A TRAVELLER FROM AN ANTIQUE LAND WHO SAID TWO VAST AND TRUNKLESS LEGS OF STONE STAND IN THE DESERT NEAR THEM ON THE SAND HALF SUNK A SHATTERED VISAGE LIES WHOSE FROWN AND WRINKLED LIP AND SNEER OF COLD COMMAND TELL THAT ITS SCULPTOR WELL THOSE PASSIONS READ WHICH YET SURVIVES TAMPD ON THESE LIFELESS THINGS THE HAND THAT MOCKED THEM AND THE HEART THAT FED AND ON THE PEDESTAL THESE WORDS APPEAR MY NAME IS OZYMANDIAS KING OF KINGS LOOK ON MY WORKS YE MIGHTY AND DESPAIR NOTHING BESIDE REMAINS ROUND THE DECAY OF THAT COLOSSAL WRECK BOUNDLESS AND BARE THE LONE AND LEVEL SANDS STRETCH FARAWAY
Cake or Death?
User avatar
Tharwen
 
Posts: 5
Joined: Mon Nov 02, 2009 10:57 am UTC
Location: Elsewhere

Re: Can you break my code?

Postby Klotz » Tue Nov 03, 2009 11:59 pm UTC

Puck wrote:
Spoiler:
I think it's "a shatter'd visage"... although "as hat terd" is totally reasonable. :) Good poem, by the way.

By the way, the cipher you used is equivalent to a Vigenère cipher with a keyword of ABCDEFGHIJKLMNOPQRSTUVWXYZ. Actually, for me at least, saying you used a computer program to encode it was a bit of a red herring, as such a cipher is simple enough to encode and decode by hand.


To be fair, I didn't spend any time trying to crack it, but I guess the point I'm trying to make is that with no clues and a small sample text, the process of deciphering essentially involves guessing a deciphering algorithm, trying it to see if it produces anything useful, varying your guess, and repeating ad nauseam until you have deciphered the text or given up. Given this, I'm not sure how to construct a cipher/decipher problem that is interesting for humans to solve - the simple monoalphabetic substitution ciphers are popular, but where do you go from there?


Where do you go from there? (I'm curious)
Klotz
 
Posts: 522
Joined: Thu Apr 17, 2008 11:27 pm UTC

Re: Can you break my code?

Postby Puck » Wed Nov 04, 2009 3:28 pm UTC

I wish I knew. When creating puzzles for stuff like this I tend to go just to out-of-the-box encoding methods, rather than typical ciphers. For instance, hiding morse code in the puzzle content somewhere, or alternatively leaving clues as to what sort of encryption I'm using. Use simple ciphers but obscure them somehow, or use complex ciphers but leave hints as to how to decode them.

Obviously, when you're simply posting a ciphertext for people to decrypt out-of-context, you don't really have those options.
22/7 wrote:If I could have an alternate horn that would yell "If you use your turn signal, I'll let you in" loud enough to hear inside another car, I would pay nearly any amount of money for it.
Puck
 
Posts: 551
Joined: Tue Nov 27, 2007 7:29 pm UTC

Re: Can you break my code?

Postby Tirian » Thu Nov 05, 2009 5:13 am UTC

Puck wrote:Given this, I'm not sure how to construct a cipher/decipher problem that is interesting for humans to solve - the simple monoalphabetic substitution ciphers are popular, but where do you go from there?


I think that the answer is in Kerchkhoffs' Principles. It should be an interesting problem to start by knowing everything about a cipher except the plaintext and the key. If all you offer is a few hundred characters of ciphertext, which for all I know could be garble about quizzical jazz trysts, then I will reflexively assume that it isn't worth my effort to untangle for "fun". Maybe it was a great puzzle, but I will never know. And, to the degree that others are like me, it won't have been worth your time to create the puzzle.

To give an example of a contrast of a puzzle that I don't think is "too easy" even though I give nearly everything away (although it is certainly far less trivial than a newspaper cryptogram), here is a ciphertext preceded by some spoilered statements about the encryption technique and some additional caveats of fairness. I suspect that a sufficiently awesome cryptanalyst could solve the problem without reading the spoiler, and a less awesome but sufficiently motivated one could see in retrospect how the encryption technique reveals itself.

Spoiler:
This message is encrypted using a Vigenere cipher with a running key. The plaintext is as "plain" as the syntax in the rest of this message, and the key is taken from a very common source (on a par with the Bible or the Declaration of Independence).


SLTWH XRWJJ ASMTA WTLER CENRR FXISN YMMYA LBNDC XOAEI LXKBE PBVLH YJOHJ ZBURZ RJKOG WOCHR TXEWG ZHVPR RDSQR HLLJI IELAO TIFLH KTMOC TGAWL ZERBN MFXYI QIYXE WBZWD VVVPT YWLWY RHRTA CQCEZ XOILX YIRVK UFVGB FIFLX WCGRK JITUS UFGLR LCPJY RIMQO GIWLQ QWMKS GMVIG LXBFF BUKDS ROLMP KTHUI QXNWW NRCLS YVHUW LZWMU YWZVI FHYXI IRILS LTNMU MWUND TBMFK CYPIR RYYWG VRQDM NVCTT GKBVT CMFHA TSMHM CRRZG XFSLZ MYXEH WJZJM GAXVP CK
Tirian
 
Posts: 91
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: Can you break my code?

Postby Goplat » Thu Nov 05, 2009 8:44 am UTC

"Break this code, no other information" puzzles have the same problem as "complete this number sequence, no other information" puzzles: the answer could quite literally be anything. Give me any ciphertext and any plaintext, and I could come up with a function that maps one to the other. The author will, of course, say this solution is "wrong", but has no way to justify that other than "that's not what I was thinking of". As I see it, if one can't come up with a better justification than that, it's not a proper puzzle.

Nose tan. I rumor, Goplat nerd? Rental pogrom urinates on.
Goplat
 
Posts: 244
Joined: Sun Mar 04, 2007 11:41 pm UTC

Re: Can you break my code?

Postby Cosmologicon » Thu Nov 05, 2009 10:09 pm UTC

Goplat wrote:"Break this code, no other information" puzzles have the same problem as "complete this number sequence, no other information" puzzles: the answer could quite literally be anything. Give me any ciphertext and any plaintext, and I could come up with a function that maps one to the other. The author will, of course, say this solution is "wrong", but has no way to justify that other than "that's not what I was thinking of".

How about "Your solution is ridiculous and obviously ad hoc, and the intended solution is simple and could easily be reached by several people independently?"

Let's see your method for mapping the OP's ciphertext to the first page of Finnegans Wake, compare it to the method given in the first line of JBJ's spoiler, and see if you really think that both solutions are equally reasonable.
User avatar
Cosmologicon
 
Posts: 1548
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA

Re: Can you break my code?

Postby Lord Aurora » Sat Nov 07, 2009 6:33 am UTC

Cosmologicon wrote:
Goplat wrote:"Break this code, no other information" puzzles have the same problem as "complete this number sequence, no other information" puzzles: the answer could quite literally be anything. Give me any ciphertext and any plaintext, and I could come up with a function that maps one to the other. The author will, of course, say this solution is "wrong", but has no way to justify that other than "that's not what I was thinking of".

How about "Your solution is ridiculous and obviously ad hoc, and the intended solution is simple and could easily be reached by several people independently?"

Let's see your method for mapping the OP's ciphertext to the first page of Finnegans Wake, compare it to the method given in the first line of JBJ's spoiler, and see if you really think that both solutions are equally reasonable.
Ugh, why decode it into a similarly nonsensical string of characters? That's not gonna do much
dedalus wrote:LA, you win the internets. That was brilliant.
User avatar
Lord Aurora
 
Posts: 530
Joined: Mon Mar 03, 2008 6:14 am UTC

Re: Can you break my code?

Postby Goplat » Sun Nov 08, 2009 5:55 pm UTC

Cosmologicon wrote:
Goplat wrote:"Break this code, no other information" puzzles have the same problem as "complete this number sequence, no other information" puzzles: the answer could quite literally be anything. Give me any ciphertext and any plaintext, and I could come up with a function that maps one to the other. The author will, of course, say this solution is "wrong", but has no way to justify that other than "that's not what I was thinking of".

How about "Your solution is ridiculous and obviously ad hoc, and the intended solution is simple and could easily be reached by several people independently?"
Those are all subjective. Fuzzy concepts like those may be a necessary evil when talking about something in the imperfectly understood real world ("Hypothesis XYZ is too ad hoc and complex; I think ZYX is more likely"), but notice that the name of this forum is logic puzzles. There's no room for opinions in logic.
Goplat
 
Posts: 244
Joined: Sun Mar 04, 2007 11:41 pm UTC

Re: Can you break my code?

Postby userxp » Sun Nov 08, 2009 7:06 pm UTC

Spoiler:
In Python:
Code: Select all
def decode(string):
    abc='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    n=1
    result=''
    for l in string:
        result+=abc[(abc.index(l)-n)%26] # Change '-' to '+' to encode
        n+=1
    return result

result=IMETATRAVELLERFROM[..]STRETCHFARAWAY (you know the result)


Can you decipher this one? (I hope I haven't made any mistake here)
Spoiler:
IKKS\GYMbY`P\W]WP2ly)B7-"$/<'2?+768D:/-H=,92M29A:8FT8LLXQDPE] 3$+,cUXPV]KMXRmRXRdTWi[ikx"z|~!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{} "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvx${flrtfcg$tl'IKMOQSUWY[]_acegikmoqsuwy{KQD|(<,2J;BBN6@DRGIH@F@Y@O@?OIOIbTWUITNW^yl/[c`}rdg_elZ\ga|agascfxjxz(myy3".x~t~)xz6&}1'%+#L
userxp
 
Posts: 51
Joined: Thu Jul 09, 2009 12:40 pm UTC

Re: Can you break my code?

Postby WarDaft » Sun Nov 08, 2009 10:02 pm UTC

Whleen a dhoiinngt f siomrestt, hiongr lelsikee tthheyis , wyoon'tu haevveen two agnit tveo p etory.p
His chances for survival shrank from small to infinitesimal.
His chances for survival shrank from small to infinitesimal.
His chances for survival shrank from small to infinitesimal!
User avatar
WarDaft
 
Posts: 82
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Can you break my code?

Postby Cosmologicon » Sun Nov 08, 2009 10:47 pm UTC

Goplat wrote:
Cosmologicon wrote:
Goplat wrote:"Break this code, no other information" puzzles have the same problem as "complete this number sequence, no other information" puzzles: the answer could quite literally be anything. Give me any ciphertext and any plaintext, and I could come up with a function that maps one to the other. The author will, of course, say this solution is "wrong", but has no way to justify that other than "that's not what I was thinking of".

How about "Your solution is ridiculous and obviously ad hoc, and the intended solution is simple and could easily be reached by several people independently?"
Those are all subjective.... There's no room for opinions in logic.

We could make an objective measure in terms of information-theory, but I get the impression you're being obstinate about this, so I'll agree to disagree. I'll just say that now that you've made your point, it's not necessary to bring it up in any more threads like this one.
User avatar
Cosmologicon
 
Posts: 1548
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA


Return to Logic Puzzles

Who is online

Users browsing this forum: No registered users and 4 guests