PDA

View Full Version : Code Breaking



M0rdain
2010-07-19, 08:01 AM
In our last session we found a sheet of parchment with some writing on it. To keep the flow of the game going we did not discuss it during the session, but we ahve been chatting about it over email since. I have been trying to work it out but failing. :s I don't want some one to work it out for me, but i was wondering if anyone had any ideas. I have tooked at transposing the letters, but not had any luck.

HVENN DJBQD JOEUN ILYIL INNWD PLHIK
HVFIK XEJKL LHILS ICLWL HILSI NQILH
IIETH LLHIK EULHI XDPJV CBLHI DCIVC
BCDSL HIYIL HDBLJ PIHDS LDYIC BVCBX
EUVCB MDECH DSLDY VAILH IYVCW DCIKE
UKHVF IKXEQ IFDEC LKXDP JINIY ICLKL
HJIIK DCKLS DKFVJ AKDCI HVYYI JVCBL
HIVCQ ENDXL HIQDE BIKLJ ESIJI LDDLH

kamikasei
2010-07-19, 08:08 AM
The simplest place to start is with a substitution cipher: each letter has been replaced with a single other letter. Try counting up the number of times each letter appears, and arranging them by frequency, then comparing that to the frequencies of letters in English (http://en.wikipedia.org/wiki/Letter_frequency#Relative_frequencies_of_letters_i n_the_English_language) and seeing if it looks more intelligible.

JeminiZero
2010-07-19, 08:14 AM
Is there any particular reason why the letters are occuring in uniform blocks of 5, and with 6 blocks per line?

Maybe theres a crossword puzzle somewhere in there?

The Rose Dragon
2010-07-19, 08:17 AM
HVENN DJBQD JOEUN ILYIL INNWD PLHIK
HVFIK XEJKL LHILS ICLWL HILSI NQILH
IIETH LLHIK EULHI XDPJV CBLHI DCIVC
BCDSL HIYIL HDBLJ PIHDS LDYIC BVCBX
EUVCB MDECH DSLDY VAILH IYVCW DCIKE
UKHVF IKXEQ IFDEC LKXDP JINIY ICLKL
HJIIK DCKLS DKFVJ AKDCI HVYYI JVCBL
HIVCQ ENDXL HIQDE BIKLJ ESIJI LDDLH

Wonder if a fixed-width font would grant new insights. :smalltongue:

kamikasei
2010-07-19, 08:39 AM
Is there any particular reason why the letters are occuring in uniform blocks of 5, and with 6 blocks per line?

To obscure any patterns relating to word length. It'd be easy to look at which letters occur on their own, for example, and say "well those are A and I".

Ormagoden
2010-07-19, 08:53 AM
You'll first need to find the key word. This code has a tabulated cipher.

If you are observant, you might notice that each "word" is six letters, and there are six columns. More than likely your keyword is six letters long.

Jeff the Green
2010-07-19, 08:58 AM
Do "Lord Vor-ixlet" or "Estri Weretooth" ring a bell? (If this is correct, the fourth letter of Lord Whatsisname can't be solved, but I'd guess you know it already.)

Crap. Didn't read the OP thoroughly enough. Spoilered is the solution a program came up with.

Hail Lord Vor-ixlet,
Me tell you the shapes: first the twenty, the twelve, the eight, the six, the four, and the one. And now the method true how to mend and fix and join, how to make the many one: six shapes, five points, four elements, three sons, two sparks, one hammer, and the anvil of the void.
Estri Weretooth

I added spaces and punctuation. I also cheated. (http://www.blisstonia.com/software/WebDecrypto/index.php)

Edit: Oh bother. I really need to learn to read.

Yes substitution cipher (really the best bet anyway since it's one of the few a human can break without a key). Forget about spacing, since that's a red herring for most ciphers. This site (http://rumkin.com/tools/cipher/) is your friend. So is this one (http://rumkin.com/tools/cipher/frequency.php).

Ormagoden
2010-07-19, 09:00 AM
The OP said they didn't want someone to work it out for them...

Shadowleaf
2010-07-19, 09:01 AM
Do "Lord Vor-ixlet" or "Estri Weretooth" ring a bell? (If this is correct, the fourth letter of Lord Whatsisname can't be solved, but I'd guess you know it already.)[/SPOILER]

I added spaces and punctuation. I also cheated. (http://www.blisstonia.com/software/WebDecrypto/index.php)
Even if this isn't the correct answer, this comment sums up what I love about the GiTP boards.

*Smacks on Shadowleaf's stamp of approval*

candycorn
2010-07-19, 09:08 AM
If the cipher is more complex, or has an encryption on it, it'll be harder to get. Back in high school, I played around with encryption programs, and with even the basic ones I did, the encryption pattern didn't repeat itself for over 1000 characters.

What's that mean? If you see an "A" in one spot, and an "A" in another, they would only decrypt to be the same letter if they were exactly 1,666 characters apart.

This is more likely to be a simple substitution, with all spaces and punctuation taken out. I can't imagine a DM would be so sadistic as to use an encryption tool with 17 different algorithms, which then encryped 4 times, the first time rotating between all 17, the second rotating between a selected 14, the third rotating between a selected 2, and the fourth alternating between one of them, and no encryption at all... For a message only 240 characters.

M0rdain
2010-07-19, 09:08 AM
Thank you for putting it in a spoiler so that i can not read it :)

Lord Vorbix, does make sense. But i still need to find out how to actually decode it :) [does not help that i am trying to do this while at work lol]

Jeff the Green
2010-07-19, 09:58 AM
Frequency analysis (http://rumkin.com/tools/cipher/frequency.php) is your friend. :smallbiggrin:


Match up the most common letters in the cipher with the most common letters in English (E, T, and A).
Look for double letters; they're often L, O, or S.
Find trigrams (repeated three letter motifs). The most common trigram in English is "the," which conveniently also has the most common letter in it!
Keep track of the key. A lot of substitution ciphers use a keyword (http://en.wikipedia.org/wiki/Keyword_cipher), and guessing it can help speed the process.

Bagelz
2010-07-19, 10:37 AM
what kamikasei and jeffery said:

e t a o - are the most common letters.
your cipher has I L D as the most common letters. so start subbing e for I, t for L and o for D (why later), and see if any words emerge. if you have the word if you have the words ZYouldXeet, you can be pretty sure that X is m, it it is "should/could meet"

doubles: your DILNY's all have doubles, so you be sure that those letters correspond to o l t e s or something else that occurrs together commonly. (this is why i said o for D instead of a for D.

i'll start you off:
HVENN oJBQo JOEUN etYeL eNNWo PLHeK
HVFeK XEJKt tHetS eCtWt HeLSe NQetH
eeETH ttHeK EUtHe XoPJV CBtHe oCeVC
BCoSt HeYet HDBtJ PeHoS toYeC BVCBX
EUVCB MoECH oStoY VAetH eYVCW oCeKE
UKHVF eKXEQ eFoEC tKXoP JeNeY eCtKt
HJeeK oCKtS oKFVJ AKoCI HVYYI JVCBL
HeVCQ ENoXt HeQoE BeKtJ ESeJe tootH
you can see by the last word, H corresponds to h,

second stephVENNoJBQoJOEUNetYeLeNNWoPLHeK
hVFeKXEJKt the tSentWtHeLSeNQeth
eeETht the KEU the XoPJVaB the one
VnBnoS the YethDBtJPehoStoYenBVnBX
EUVnBMoEnhoStoYVAe the YVnW one
KEUKhVFeKXEQeFoEntKXoPJeNeYentKt
hJeeKonKtSoKFVJAKonIhVYYIJVnBL
heVnQENoX the QoEBeKtJESeJe tooth

third step

your E and V should be a i or s. E for i seems to work out better
haiNNoJBQoJOiUNetYeLeNNWoPLHeK
haFeKXiJKt the tSentWtHeLSeNQeth
eeiTht the KiU the XoPJVaB the one
anBnoS the YethDBtJPehoStoYenBanBX
EUanBMoEnhoStoYaAe the YanW one
KiUKhaFeKXiQeFointKXoPJeNeYentKt
hJeeKonKtSoKFVJAKonIhVYYIJanBL
heanQiNoX the QoiBeKtJESeJe tooth
fourth step

K B J N should correspond to some permutation of s r d l
So i put in s for K and found the word eiTht and put in g for T and rearranged line endings to match with words
haiNNoJBQoJOiUNetYeLeNNWoPLHeshaFesXiJst
the tSentW the LSeNQe the eight the siU the XoPJVaB the one
anBnoS the YethDBtJPehoStoYenBanBXEUanBMoEnhoStoYaAe
the YanW one siU shaFeKXiQeFointsXoPJeNeYentsthJeeson
KtSosFVJAsonIhVYYIJanBLheanQiNoX the QoiBestJESeJe tooth


filling in the blanks
no really this the entire rest of the solution

and noS the YethDdtrPehoStoY end and XiU and MoinhoStoYaAe
the YanW one siU shaFeKXiQeFointsXoPreleYents three son
stSosFarAsonIhaYYer and theanQiloX the QoidestriSere tooth

hail lord QorOiU let me tell WoP the shaFes Xirst
the tSentW the tSelQe the eight the siU the XoPr and the one
and noS the methDd trPehoStoY end and XiU and MoinhoStomaAe
the manW one siU shaFesXiQeFointsXoPr elements three son
stSosFarAsone hammer and theanQiloX the QoidestriSere tooth

hail lord vorOiU let me tell you the shaFes Xirst
the twenty the twelve the eight the siU the Xour and the one
and now the methDd true how to mend and XiU and Moin how to maAe
the many one siU shaFes Xive Foints Xour elements three sons
two sFarAsone hammer and the anvil oX the void estri weretooth

hail lord vorOix let me tell you the shapes first
the twenty the twelve the eight the six the four and the one
and now the method true how to mend and fix and join how to make
the many one six shapes five points four elements three sons
two sparks one hammer and the anvil of the void estri weretooth


and we can start to see some words such as "the" emerge. I was tempted to switch "C" for "a" but i can see that will not work(two instances of oae. I think "n" will work though).

Bushidough
2010-07-19, 11:48 AM
e t a o - are the most common letters.

snip



There is a useful mnemonic for the most common letters in the English language:

ETA ON RHS

aka "Estimated Time [of] Arrival ON [the] Right Hand Side"

valadil
2010-07-19, 11:52 AM
Out of curiosity, how does one solve a rotating cipher? That's a system where all letters are incremented by a value depending on their position. ie, the first letter increases by 1, the second by 4, and the third by 3. Then 143 repeats, so the fourth goes up by 1, fifth by 4, etc.

I've seen a few of these in game. Some amount of statistical analysis helps. Usually though the GM gives out clues (make an int check and I'll give you punctuation) until we reach a point where the puzzle is solved. Is there a better method? Or is this the sort of thing that's complex enough that it should be solved by software?

Jeff the Green
2010-07-19, 12:08 PM
Is there a better method? Or is this the sort of thing that's complex enough that it should be solved by software?

Everything should be solved with software.

Ahem. If you could figure out the key, it's trivial to solve. If I were DMing, that'd be an option I'd allow the players to take. Intecept another message, find some way to divine it, or just intuit it out (e.g. drop hints that the BBEG's familiar is named "fluffy").

Without the key... I couldn't solve it, but I'm not cryptographer. I'd say it's pretty hard, though. Depending on the complexity of the rotation, it could be nearly impossible (the Enigma machine was a rotation cipher-creator).

Siosilvar
2010-07-19, 12:09 PM
There is a useful mnemonic for the most common letters in the English language:

ETA ON RHS

aka "Estimated Time [of] Arrival ON [the] Right Hand Side"

Or you could just remember "etaoin shrdlup" but your mileage may vary.

valadil
2010-07-19, 12:14 PM
Everything should be solved with software.

Ahem. If you could figure out the key, it's trivial to solve. If I were DMing, that'd be an option I'd allow the players to take. Intecept another message, find some way to divine it, or just intuit it out (e.g. drop hints that the BBEG's familiar is named "fluffy").

Without the key... I couldn't solve it, but I'm not cryptographer. I'd say it's pretty hard, though. Depending on the complexity of the rotation, it could be nearly impossible (the Enigma machine was a rotation cipher-creator).

If the puzzle is trivial I'd rather not bother giving it to the players. Basically I'd like to figure out where the line is drawn between encryption that can be cracked by hand and the kind that really does need software.

Until I run a modern game where all the players are decent coders, I'd rather not require programming as part of the game, even if you refluff it and claim that that python script was really divination.

Fouredged Sword
2010-07-19, 12:17 PM
Hand cryptology takes a long time. You need to guess the patern being used and reverse it. If you think that a variable is being used to prevent frequency anyalsis, then try to guess a the variable and insert it to see if you can crack the code that way. This is mostly done in cases that a frequency solution doesn't help. A computer program will do the same thing, but will run all posible permutations and give you a selection that looks most like english.

Things can get wierd if you really want to hide a text from anyone with out a key, like a rolling variable that alters the lettering or non-standard letter location. Cracking a code that, rather than being read left to right, alternates letters from the left and right side of the page or something. It is crackable quickly if you know how it is built, but figgureing out how it is built is the problem.

Harperfan7
2010-07-19, 05:15 PM
...you could make a decipher script check.

Dr.Epic
2010-07-19, 05:23 PM
The simplest place to start is with a substitution cipher: each letter has been replaced with a single other letter. Try counting up the number of times each letter appears, and arranging them by frequency, then comparing that to the frequencies of letters in English (http://en.wikipedia.org/wiki/Letter_frequency#Relative_frequencies_of_letters_i n_the_English_language) and seeing if it looks more intelligible.

Like Sherlock Holmes in the Case of the Dancing Men?

Math_Mage
2010-07-19, 06:18 PM
If the puzzle is trivial I'd rather not bother giving it to the players. Basically I'd like to figure out where the line is drawn between encryption that can be cracked by hand and the kind that really does need software.

Until I run a modern game where all the players are decent coders, I'd rather not require programming as part of the game, even if you refluff it and claim that that python script was really divination.

If you want to really make sure that programming isn't needed, just leave the spaces between words as they are. That makes the puzzle much easier to solve.

imp_fireball
2010-07-19, 07:52 PM
I read cryptonomicon.

... Unfortunately, it confused the hell out of me. So can't help you. Kthxbai.

jseah
2010-07-20, 12:34 AM
Is there a better method? Or is this the sort of thing that's complex enough that it should be solved by software?
This is basically a vignere cipher. You attack it by looking for triplets that repeat.

In a long enough cipher, "the" could occur such that the rotating key encodes them the same way.
Thus, if ULH (THE + 143) occurs twice 21 letters apart, you know the key is 21, 7 or 3 long. All you need is another such repeat, say 18, which indicates 18, 6, 3 or 2, to show that the key has a length of 3.

Then you know that the 1st/4th/7th are all shifted the same way, 2nd/5th/8th and 3rd/6th/9th likewise. Apply frequency analysis and english language.

kamikasei
2010-07-20, 02:59 AM
Like Sherlock Holmes in the Case of the Dancing Men?
*checks*

Yes, that was of the same sort.

M0rdain
2010-07-20, 03:15 AM
Thank you for all the help, We managed to solve it. (mainly done by our Party Rogue) i think he had more speare time yesterday. Hehe. :smallwink:

valadil
2010-07-20, 09:27 AM
This is basically a vignere cipher. You attack it by looking for triplets that repeat.

In a long enough cipher, "the" could occur such that the rotating key encodes them the same way.
Thus, if ULH (THE + 143) occurs twice 21 letters apart, you know the key is 21, 7 or 3 long. All you need is another such repeat, say 18, which indicates 18, 6, 3 or 2, to show that the key has a length of 3.

Then you know that the 1st/4th/7th are all shifted the same way, 2nd/5th/8th and 3rd/6th/9th likewise. Apply frequency analysis and english language.

Incidentally I think that's exactly how we solved those. Each time I was given one of those puzzles, "the" was repeated enough that it appeared as the same triple several times in the text. As a GM, should I write the text in a way that includes "the" at an interval that allows this to happen, just to make sure it ends up being solvable?

jseah
2010-07-20, 11:49 AM
That certainly makes it easier.

In my case, I was trying to make it harder to ensure they had to reach the contact to get the message. So I removed all grammar as well.

In particular:
HWTNEQYTUZJNOQSYMCHUEQJKYFHJVBJVWPMWVPWSCAASZCSVYI VXNXUDCMKQBSJDSQEUHZYSHBASMMWUYXLNHVUSLIETNVYR

decoded to,
NOBILITYARRIVINGSUPPLIESEXPECTEDCHURCHRAISINGUNDEA DSUPPLIESLIKELYIMPORTANTINTERCEPTIONPARAMOUNT-

Keyword: THRESHER

The last letter was added to fill it in, and as a "clue". Since R doesn't appear anywhere else (I used 26 = z and 27 = a), you could guess that was a 0 added to the last letter of the key. Then you also know a number of key lengths to try as a factor of the length of the message.
Not quite enough to crack easily since it's just a guess but helps alot.