zMUD Cipher Script

The serpent encipher suggestion in the Dais made me curious about how long it would take for someone to crack the cipher I made in zMUD. I posted about it before, years ago, but only one person responded at all and I don't think anyone actually tried.

So this time, whoever solves it first gets 5 credits. 10 credits if it's solved today.

Here are the ciphertext samples to crack. I won't say anything about the method used, except that it's a substitution cipher, and that there's a sort of complication added that makes the last sample a bit different than the rest.

2/MKk-]6g'?7:0CeK'-l Kx_

,?ZRCeK'-l KCE'gW)*)966])p.]YjjwKM].-32wu-96ZD,MAV0heNu-7LNsg')*l_w2yL].KM$Z0=2]Yjjw26,?962ULbz22UwzZS6g.Og6Vo KM0

,t-0X2j8X2x7eNu-ZR].Rq96M1l_69j+:j*b].',].U..]V7].Rd'gAf-026,?96'KDZU2.]U2qZdQKMg'0N K-0AV2w4V].',XMS*'gJSE,Ce96W0$Z7L'g=t7L.]?7zwYjjwCE.]zn03ENyt'UX2j8g'VTT22U].2zgKl^'wu-96qZdQKM\MCe3*964VwC!eMb\MXEj?.JEN=t7L.]*)X.O2j8Ue]2J6Kr]6zjeNu..]Voajz22UXEKM?j2wMKQZVoE,ENty]6l_]674\MNEVo-.].Rd4!]6ofVo96l^b.=aaj].$Z,E26YV].Rd'g)*/UeNNk2TM,Mg?j3rK'CE.]VpKr.] K0-z9g9MKEG0-26s(g9MKEG0-CE2X*)k-g'jYM,ENLy*32t\2KM96l:96u-96qZdQKM.JLbg'SJZ=K'].2zgKl^'x\MwzVo-.g't*]6ofu-4V]w=t7L.]u-96/Uu-7AN.'KhW690+OE.]u-tyCE.-'g6]h00Q)*b.)*Vog9Gd',vK]674].-3.]u-KM9M'g6]?j:0z22X5jOiSZ^l)*Vo]6d_,E].-3.]JS'U'gu-96a=-0g'SJZ=966])p.]EGf_KMU2.]u-Fy].',gMK'bx

v8ZRS2El3:96xA963:tyB'lES*ENYXElXwVf6aR7f_c'U26y
«1

Comments

  • Also, if nobody is making any progress after a couple of days, I'll give a bit more information about the cipher.
  • NizarisNizaris The Holy City of Mhaldor
    I'm bored, so I'll try a character frequency analysis, and see what that gets me. You said it's a substitution cypher, so it should be vulnerable to that, right?
    image
  • All the ones in the "spy tricks" books I used to read were alphabetic with one case at most, and I still tended to cheat and flip to the back for the answers. Anyway I'd gotten as far as highlighting double letters, and looking for common letters, when I started looking for digraphs (today I learned about digraphs and trigraphs), and began suspecting I was taking the wrong approach.
    image
  • NizarisNizaris The Holy City of Mhaldor
    I think that the digraphs could help, @Blujixapug.
    image
  • Yep. I think I'm on the right path now, although it's not making things much easier. I'm doing a frequency analysis, the slow way.
    image
  • NizarisNizaris The Holy City of Mhaldor
    Ok. I've got frequency analysis, digraphs, trigraphs, and double letters done. Now just to make guesses...
    image
  • NizarisNizaris The Holy City of Mhaldor
    Ok. I'm giving up. Here's what I figured out so far, for anyone else who wants it.


    ]=45 .=42 6=36 2=32 '=31 K=30 -=29 M=27 g=25 9=22 E=20 j=20 0=18 V=17 ,=15 Z=15 *=13 N=13 U=13 u=13 w=13 7=12 )=11 z=11 C=10 e=10 l=10 o=10 ?=9 L=9 X=9 t=9 ==8 d=8 3=7 J=7 S=7 b=7 4=6 R=6 _=6 y=6 =5 Q=5 Y=5 :=4 A=4 G=4 O=4 \=4 ^=4 a=4 f=4 q=4 x=4 $=3 /=3 8=3 T=3 W=3 h=3 k=3 p=3 r=3 !=2 +=2 D=2 s=2 =1 Double Letters 6 j j 2 . j T 2 . 2 a N 0 2 6 Digraphs .]=16 96=15 ].=15 u-=12 KM=10 g'=8 ]6=8 Vo=8 'g=8 )*=6 -9=5 MK=5 K=5 K'=5 7L=5 CE=5 -0=4 6]=4 ,E=4 26=4 22=4 2U=4 eN=4 EN=4 ]u=4 Ce=4 \M=4 .-=4 .'=4 .R=4 ',=4 E.=4 g6=3 g9=3 t7=3 -3=3 Zd=3 9M=3 ?j=3 Yj=3 ,?=3 L.=3 Rd=3 l^=3 l_=3 2w=3 2j=3 EG=3 $Z=3 X2=3 *)=3 =t=3 d'=3 qZ=3 dQ=3 ]V=3 j8=3 0-=3 jw=3 jj=3 z2=3 6l=3 V]=3 U2=3 Nu=3 4V=3 QK=3 :0=2 ty=2 -l=2 gK=2 Trigraphs -96=5 THE u-9=5 *TH .]u=4 ]u-=4 **T ].R=4 ZdQ=3 qZd=3 .]V=3 z22=3 QKM=3 2j8=3 t7L=3 eNu=3 E.]=3 CE.=3 .',=3 =t7=3 jjw=3 L.]=3 .Rd=3 .-3=3 dQK=3 ].-=3 ].'=3 7L.=3 22U=3 Yjj=3 l K=2 )p.=2 ]6o=2 *E* 9MK=2 H** U2.=2 l^'=2 KM9=2 **H g'S=2 -l =2 ZdQ=3 qZd=3 .]V=3 z22=3 QKM=3 2j8=3 ,?9=2 ])p=2 2zg=2
    image
  • edited August 2012
    Are we collaborating on this? I have some thoughts, and I don't particularly want the credits, but I don't mean to violate the spirit of the competition if that's a thing.

    edit: Plus I don't see myself solving this on my own.
    image
  • Collaborating is fine, I guess it's up to the winners how they split the credits in that case. Working on it publicly here is also fine, but that could lead to not having a clear winner.

    Frequency analysis might be useful for finding some information about the cipher, but it won't do much to actually break it, at least not without a much larger sample.
  • Ok! There doesn't seem to be a spoiler tag, so I'll format what I'm thinking in white instead. Highlight it to read or don't if you'd rather not.

    I suspect the cipher actually has each plaintext character represented by two characters in the ciphertext. I'm not sure if the four samples from Sena's original post all comprise a single sample, and use the same cipher, or not. But to take a chunk from the largest one, what I think is that...

    ,t-0X2j8X2x7eNu-ZR]

    is actually

    ,t
    -0
    X2
    j8
    X2
    x7
    eN
    u-
    ZR

    ...and each of those two-character digraphs represents one enciphered character. It's tricky to analyse this because I'm not especially tech-savvy, and don't have a good way of formatting a block of text like ABCDEF into AB CD EF, which would make frequency searches far easier - since, from that example, finding BC is a false result, as only AB and CD are real characters. It doesn't help that space itself seems to be part of at least one enciphered character, rather than a space representing a space. Some characters from the enciphered text seem to be part of multiple enciphered characters, with 6 being part of ]6, 96, 6], 26, and possibly others. 96 seems to be the most common digraph with possibly 17 instances, but its exact frequency is tricky to work out as =966] could include 96, or actually be =9 and 66. I'm also not sure if, in the largest sample from Sena's post, the line breaks represent spaces, and formatting has been forced there. Some text editing programs I've used have trouble recognising a space at the end of a line.
    image
  • To clarify some things: Line breaks aren't a part of the cipher at all. There are four separate samples, with the fourth being somehow different (but still using the same cipher method) from the first three.
  • I'll use white text, too.

    The old thread is here:  http://www.achaea.com/forum/zmud-text-encryption

    Based on that thread I'm thinking the "complication" in the fourth sample is that it uses a different key (and it has the same v8ZR pattern from the first examples in the other thread, maybe it uses the same key as those if v8ZR is some kind of key signature).

    The weird recurrence of 96 and [. seems consistent across different keys. Other strange repetitions are common (MKEG0-, Nvj)96,MKM[..Y', W0K0, ^)2w, mAI_[.',). Many of these repetitions in the original thread occur in similar positions on two adjacent lines (but often displaced by some number of characters). This is especially true in the second set of strings in the original thread (the "easy" ones).

    You're probably onto something with the digraph idea, because all the most common patterns (96, [., and ]. for example) occur at even character offsets. But I don't think it's simple substitution, most of the digraphs don't seem to repeat much even with the same key, but a few repeat constantly even when different keys are being used. It seems like there are multiple alphabets at play, and we know there are multiple keys, so why does 96 keep showing up?

    I don't know any crypto, so I doubt I'll be much help beyond that.
  • I've made some changes to the script since the old thread, and I don't remember what exactly has been changed, so I can't guarantee that a different key is the only difference.
  • Just to clarify regarding the @Blujixapug's line break question, it looks to me as though the third block of cipher text is intended to be one long line, and the forum formatting puts line wraps at the spaces, so that the sequence spanning what looks like the first line break is "0N K-". Is that right?
  • I see what you mean now. It is intended to be a single line. The forum's wrapping does break on the space in "0N K-", the rest of the line breaks (at least for me) aren't on spaces.

    If you want the samples unformatted, copying and pasting into notepad (with word wrap turned off) works for me.

  • Sena said:
    I see what you mean now. It is intended to be a single line. The forum's wrapping does break on the space in "0N K-", the rest of the line breaks (at least for me) aren't on spaces.

    If you want the samples unformatted, copying and pasting into notepad (with word wrap turned off) works for me.
    Yeah, that's what I did (vim instead of notepad, but same difference), I just didn't check past the first occurence. The first and third line breaks for me, "0N K-" and ".] K0", are on spaces, the others aren't.
  • More white text.

    I'm pretty sure I'm on the wrong track. I focused on the largest sample, the third one, since I figured it would be easier to find patterns in a larger sample, and did not want to assume all three samples used the same cipher. Following my earlier suspicion that each plaintext character was represented by two enciphered characters, I separated the text out into blocks of two letters at a time, so ,t-0X2j8X2 became
    ,t -0 X2 j8 X2. I did a frequency analysis on this, and some patterns did emerge, but they didn't provide me with any useful conclusions at all.

    Of 628 enciphered characters, following my hypothesis, there were 314 2-character pairs (divide the total by two). Of these there were 147 distinct digraphs. Even assuming lower case, upper case (and it is not likely that all 26 characters would appear in upper case), all numbers, and a generous number of punctuation characters, this is just too many characters for the English language.

    The most common digraph was ]. appearing 13 times. 96 appeared 12 times, u- appeared 10 times, 'g, KM, ]6, and Vo appeared 7 times, and g' appeared 6 times. 88 digraphs appeared only 1 time each. But according to internet sources, E, the most common letter in the English language, should appear with ~12.7% frequency. T, A, O, I, N, S, H and R appear with 9.1%, 8.2%, 7.5%, 7%, 6.7%, 6.3%, and 6.1%, and 6% frequency respectively. So even the most common digraph, ]., appearing 13 times out of 314 characters, only had 4.14% frequency, less than any of the 9 most common letters. It's possible that it could represent a space or some other common punctuation... but there are just too few common digraphs appearing.
    image
  • It's been two days now, is there anyone working on this (is it just Blujixapug now?) who doesn't want further hints?
  • I'm poking at it off and on, but haven't gotten anywhere that would suggest that I'm going to get much farther without hints.
  • edited August 2012
    It's a digraphic, monoalphabetic substitution cipher. Each digraph represents two characters, not one (except for a certain situation). It's based on a well-known classical digraphic cipher. There are 6561 possible digraphs (or 6642, if you count the special case I mentioned as a digraph).
  • edited August 2012
    This is interesting. I haven't been interested in ciphers since I was twelve, when I decided that my nosy little sister was going to read my diary no matter HOW I ciphered it, and switched to a created language that she gave up on translating very quickly. That said, if anyone wants to see my last attempt - which was simpler than Sena's - feel free to private-message me. If there are 5 of you, I'll start a thread in off-topic.

    Edit: This isn't SIMPLE substitution either.
    Miin-aan baash kimini-sij-i-gan bitooyin sij-i-gan-i bukwayszhiigan = blueberry π
  • Sena said:
    It's a digraphic, monoalphabetic substitution cipher. Each digraph represents two characters, not one (except for a certain situation). It's based on a well-known classical digraphic cipher. There are 6561 possible digraphs (or 6642, if you count the special case I mentioned as a digraph).
    So wz could represent aa or ab, ba, bb, ac, ca, bc, cb, cc...? :-&
    image
  • I think I'm gonna have to give up.

    I only analysed the largest sample. I highlighted all the common digraphs. Sixteen appeared four or more times: ]. and .] appeared thirteen times each. 96 twelve times. u- ten times. ]6, Vo, 'g, and KM seven times. g' six times. -0, ',, CE, EN, \M, )*, and 7L four times.

    There were patterns. There were strings of digraphs that each appeared only once, all in a row. There were digraphs that only or often appeared near others: among others, both instances of 74 appeared as ]674, both instances of -3 appeared as ].-3.], both instances of SJ and Z= only appeared as g'SJZ=, and two of the three instances of MK and EG and all three instances of 0- appeared in the string 0- z9 g9 MK EG 0- 26 s( g9 MK EG 0-, or ABCDEAFGCDEA. Common digraphs showed up in strings of ABA, ABC, ABCB, ABCD, etc. Here's a screenshot of what I've been peering at in a Writer document: http://i.imgur.com/Rv5Dg.png. I compared these common digraphs to a list of supposed common pairs in the English language: th er on an re he in ed nd ha at en es of or nt ea ti to it.

    But no revealing double pairs leapt out (eg. ATAT or ININ, compared to things like SS or LL which would have shown up in a single-letter substitution cipher). I suspect if I tried substituting common digraphs with many different common pairs, eventually some words would begin to emerge, like "the", "this", "and" etc. I guess I just ran out of patience. I also suspected that based on how the plaintext was encrypted, depending on where letters lay, "an" would sometimes be represented by a digraph for "an", and sometimes split in two, as in "ra" "nd" "om", which would potentially make deciphering far more difficult. This may not be the case though. Not having things like word length, spaces, or punctuation obviously made things far more difficult - but you can't hold that against someone trying to create a strong cipher.

    So yeah. I spent a good few hours on it. It was interesting the way patterns started to emerge from an indecipherable mess of characters after staring at it for long enough. But I give up.

    image
  • That's 81^2 possibilities, so a total of 81 characters used in the plaintext. Sounds like case-sensitive alphanumeric (62) plus some basic punctuation/etc.

    Then another 81 "special cases." Maybe in addition to the digraphs for each possible pair of characters, there is also one digraph for each individual character (in case of an odd number of total characters).
  • *sigh* This thread makes me want to give this sort of thing another go...
    Miin-aan baash kimini-sij-i-gan bitooyin sij-i-gan-i bukwayszhiigan = blueberry π
  • The system will not allow me to private message Sena - so pardon my minor hijack here --->

    Howdy - I reinstalled the "experience to" script as it started showing negative numbers ... and this is its new output. I suspect I am doing something wrong, but for the life of me cannot figure out what. 

    You are level 100 (The Dragon Lady) and 15.3% of the way to the next level.
    You are -29.8% of the way to 101.

    - To love another person is to see the face of G/d
    - Let me get my hat and my knife
    - It's your apple, take a bite
    - Don't dream it ... be it


  • I fixed the problem and uploaded a new version of the script here. Let me know if it still doesn't work right.
  • edited August 2012
    Since it seems nobody else is able to make more progress, I'll give a bit more information.

    Sample 1: 4 words (separated by spaces). 18 alphanumeric characters, 5 punctuation (anything not alphanumeric) characters.
    Sample 2: 21 words. 91 alphanumeric characters, 23 punctuation characters.
    Sample 3: 115 words. 495 alphanumeric characters, 133 punctuation characters.
    Sample 4: 11 words. 37 alphanumeric characters, 11 punctuation characters.

    It's based on the Playfair cipher, but with a much larger square and slightly different rules. The "key" is essentially the entire square.
    In the first 3 samples, "]." is " t"
    One major problem with doing this in zMUD is that there's no way at all to parse the contents of a variable as completely literal text, which means that certain square configurations can't be made to work (for example, having [ before ] in the square is impossible, ] has to come first), so I can't use a completely random square. Because of that, there are often similarities between the multiple keys used, so one key can often provide a partial decryption of ciphertext from a different key.

    Using a list of common English digraphs won't help much on its own, unless it takes into account punctuation and spaces. They're generally designed for letters only, in a single case, and a single word at a time.
  • This thread has me thinking about doing an implementation of RSA in lua, just so I can avoid having the issue of sharing keys...
  • Sena - somehow I never saw the response. I finally made the switch to Mudlet, but if you'd like me to log on with zMud to try the script on an independent system I'll be happy to do so.


    - To love another person is to see the face of G/d
    - Let me get my hat and my knife
    - It's your apple, take a bite
    - Don't dream it ... be it


Sign In or Register to comment.