14
$\begingroup$

The programs I used to automate this are currently on CodeReview.


While I was bored yesterday, I met this girl online. Her name is Sistek - she said she's Czech, but her English is perfect, so I don't really know. We started chatting, and I told her that I was an expert code breaker (I installed a program that can crack substitution ciphers a while ago so that I could tell girls that - that's all they ever send me anyway). She had to go to bed (screw timezones) so I told her we'd talk tomorrow.

Day 1

When tomorrow came around, she sent me this encoded message:

Ulun, J'a htbietb ej i rifmaljs biimrih xqhlp.

Problem was, my substitution cipher program didn't work. So, I kept up the game - better than just admitting I was lying. I asked her for a couple hints, but she said she'd only give me one a day, starting tomorrow, along with more messages. She sent me the following, much lengthier, message as my work for today (I added spaces to the left and newlines for readability, as on the rest of her messages).

Hsnebzja bih tfx dza uu zeb'b, qrjbqpvul lztqjk. I'we ufl fw mcr jbyq eihqe hxbi jqfxp 
 nixbfbfac? Mm icb it ibyml qfv. G qhlpqe nqridy jk hwpk; maaknebpjt qfh ua ulyaytv 
 dzjie qfm. Auu za! Oixbed xeva dqithqi fk eqdxrn jlbfrae ra oqgb tpo bqdxti qgt jqgl, 
 rb oma aumcj kjlqglr bq lrakly ayieqeihb shtbi, E tbejifo uor ifpf vbqfzjiau tjqja. 
 Pncml dz, dzd wiyqfp naoveeat, qtk ie dx, raa ulpa ytqt khvuup, nja ul bfa ceubq au; 
 ndbzapplv eunj iera oq gadqe tsncn edw'l rfoi huejtfxm. Lqh ly rm q rb iieju uuri J 
 lbee uqe elly lq. Cc tqt khxeq fmb zh wbol ybfr aeqj i fxm lqeh vakjleb bqubj hrmbtazmm.

She assured me it was in English, and because I pressed her, she also sent me the following message as a standard to work off of. She said that if I were to solve a part of this, I should know the rest of it immediately, which would help with the rest of my decoding:

Rmh wixtk fud zq eihqie ld wf pfkmlqe hxbij kmsl paytv dzjifee ieai xe ue brj. Ad aoh 
 ucctqnqmbq ehxri. Fmaktvm waoqgtjt ktqqgbtau ukf kn orj btaytvdw fmfz jia utj qhdz? Er 
 btebbqf zj iautjq, ehvizd xqf mteu ebrjadfeie dxr. Afahxr jbjj hne Aut jqf pnu etqr 
 ijlfv abqhf. Ptgtiqgt jlt ipe tdz foh Tfyieaohuf Yipbjjgbi d yqeelqji ej aiea ohwfudxrk 
 uubihuby. Ne dx udlzjgq hlpbii hueh ubyne htu dfkf cq gun ayh ucct hqfhuayti mt. 
 Pnqithlpp weba dixun anjirnj iautj qh dz erb teb bq fzji autj qgapi xplqfmt eueb rjadfe. 
 Iedx rafah xrjb jf, E ieiwneavu wjq ne ubundxr ajvmsb jpwmctq. Rjbyq etvhwh uby 
 npqfipbijh f xfb fvb ouo iza kmc qitiqi thq frdufjlpx ncayh. Ufyh va oe iboneaut 
 jqieleaf k ms fpfvbq aut sayhu bymslymae atqt k iedxra autjqfi camadja. Hu fy hub 
 yn erb lrakjlfvbg qfnde rbqlzjhc ctqb efm auuzdzuxfe. Jlao hufyi rbiht fxnmb yji 
 rjbq etabavhur idyrmeipo htmumw. Bjne anndccie aoi eq ja mpobh. Bshw fybo jkirm 
 sjiauuza ojl aoie jq, fdixq iqi tqakh ver rafz. Ji eqhu B he aaytqtkh tmw ebq 
 fiwfknor jbt aytveaj lqee. Be uboqg lr bsampun eaut. Jq iqrbedyr jt qqg vhq ficf 
 uhxbgmu qgafr meb qithq ifkfudz ppneiwnceq! Hvfoh ufyjlayied, xrar ifab jp oiwlpakm 
 cqi tqqglr! Plh urlp nppnemta mm auz tjmdmsfm htudfk euqjuwesra maraaxm lrjby.

If you guys could solve this for me, I could get a lot of street cred with this girl. I could really use your help. I'll keep you all posted on what she sends me.

-Robert

Day 2

She wasn't on long today. She said me the following transmission:

Rijirif mp vtqav jldwmcq gbtauuze aieeajlalu ueqhvfoie iwma. Mmjlayhuc alr eq hvdw fm 
 avuw pviza knerj bpeubpmwa mjuadq fpw lz jqb ihuf yjlaud zppj ierao qe ihqf unjaj 
 seuf ppoti rilp mminbf. Tk esm crkjlebb qcblyfm lrfkf mfzjimcuu pot vdw fmfzjiflu 
 uplipa oimfwlqc cihue hvrb nhb rdzdwiqjiq oj qnd et lpbii hue jlauf mccve cccbqe 
 dzdw fpayu obii ceqizi wmmj iqo rnj iul unq. Fj hpu lsaxjiulu njah wev mtbfac qg 
 btpobq jq ne awnhb sadqjmd mun epx mliw lya yie dxbh eub qal jgesnpj kj heubo qe 
 hxbiicmvev bgne fvbqaut. Jqieiixqiq hpzrmdzvh ei ayebrjbyqg btpobqj qnems dzfohuf 
 yhvd wfdiwne aknd munh az mmqe hxb iht mspni wfmeslr dxlqqjapdw muqh etjkjlea 
 etbfrdju adjk jtfx mbiwneakj lp obqby mlb graulunqi. Eiea htayuupo igfy jqiwmaa 
 yhuc ctqtg euqfud ji qiu lunqieieaj gridybfbqa vuwbpuur mdz qe fler akb glpj 
 kjtf xm lqiebfy uvbgr aulunqe t sn. Cne fbn ebz uni wfmav uwiw lpb ptqfmraa uuzdzu 
 wes tvms ji ri iqlr ana uuz aoixbe dxev adqgb tpobq aknc uftube dyizndawpx.

She also apologized for its quality - she claimed she was in a rush.

This was her hint:

Sometimes the cipher adds a small amount of random information to the end of the plaintext before encryption to ensure the encryption works correctly.

Day 3

We chatted for a bit. Before she logged off, she sent me a transmission:

Autjqfule atuixuzfoi ffbmbqith qfjiavtkq edzpwlray hwixtifuj. Tbonejrhua yadqg mdjr, 
 tijkjlauf mes lqrn jl pytspojl dwhvpo. Bt tgl ypu nebfam juadaojl ayhu fyhtfybib 
 iieebnebqm djuadmcj lavlpq iel ebipfv?! Acb fra hw ticar aer aommiz ebihiwiz D xhu 
 bicbm mimbijg fudy qie ld. Wipfyayq ficfoic fwbqriif aojgfvthbi jleahubyn eiflyt 
 ka dm mhucalreq hveat qt. Kihm une ubjhrm bt azmm qgadf dpnqetsf? Ohufyhv n. Dj 
 hmth ubiiepob qb oml al tq dwnc qji pfx fmautjqith plicfoj sfwn eaut jrk ne 
 fwa kqee. Iualqumrc.

and a hint:

There were numbers in that transmission - because of the cipher, they will not come through. The are mostly irrelevant - I can spell them out later for you if you need them, and if you ever see something that look like Roman numerals in the plaintext, that would be important numbers.


What chat handle did Robert use?

$\endgroup$
  • $\begingroup$ not sure, but I think his chat-name is "bonkripper87"? $\endgroup$ – Hulkerman Jul 25 '17 at 8:22
10
$\begingroup$

I guess the answer is

Mr. Incredible?

The cipher

assigns each character a (base 6) value: \begin{array}{r|c|c|c|c|c|l}\text{a}=12&\text{b}=25&\text{c}=41&\text{d}=14&\text{e}=03&\text{f}=52&\text{g}=50\\\text{h}=05&\text{i}=45&\text{j}=21&\text{k}=35&\text{l}=40&\text{m}=31&\text{n}=10\\\text{o}=15&\text{p}=04&\text{q}=44&\text{r}=23&\text{s}=01&\text{t}=02&\text{u}=33\\\text{v}=34&\text{w}=20&\text{x}=54&\text{y}=53&\text{z}=22\\\text{(space)}=42&~\text{.}~=24&~\text{,}~=32&~\text{?}~=43&~\text{'}~=13&~\text{-}~=55&\text{(newline)}=30\end{array}

Then

the numbers are combined into three-digit groups and each of those is turned into two letters (base 26) as if the numbers were base 10: \begin{array}{c|c|c}000=\text{aa}&001=\text{ab}&\dots\\026=\text{ba}&027=\text{bb}&\dots\end{array} I guess the cipher adds random spacing and punctuation?

The deciphering works

by going through the same steps in the opposite order:

  1. remove the spacings and punctuation
  2. arrange the letters into two-letter groups
  3. give each group a three-digit numerical value by switching from base 26 to base 10 (having 0's in the beginning if needed)
  4. rearrange the digits into two-digit groups
  5. Use the cipher table above

The decrypted messages are, in order:

Day 1 message 1:

your secret is safe with us

Day 1 message 2:

we have something in common.
according to the government, neither of us exist. please pay attention, as this message is classified and will not be repeated. i represent a top secret division of the government, designing and testing experimental technology, and we have need of your unique abilities. something has happened at our testing facility.

Day 1 message 3:

i propose to consider the question, 'can machines think?' this should begin with definitions of the meaning of the terms 'machine' and 'think.' the definitions might be framed so as to reflect so far as possible the normal use of the words, but this attitude is dangerous, if the meaning of the words 'machine' and 'think' are to be found by examining how they are commonly used it is difficult to escape the conclusion that the meaning and the answer to the question, 'can machines think?' is to be sought in a statistical survey such as a gallup poll. but this is absurd. instead of attempting such a definition i shall replace the question by another, which is closely related to it and is expressed in relatively unambiguous words. - a. m. turing

Day 2:

it is contained within an isolated area, it threatens to cause incalculable damage to itself and to our facilities, jeopardizing hundreds of millions of dollars worth of equipment...
because of its highly sensitive nature...
if you accept, your payment will be triple your current annual salary. call the number on the card. voice-matching will be used to ensure security. the supers aren't gone, mr. incredible. you're still here. you can still do great things. or...you can listen to police scanners. your choice. you have '' hours to respond. think about it.

'this message will self-destruct.'

Day 3:

the omnidroid '''' is a top secret prototype battle robot. its artificial intelligence enables it to solve any problem it's confronted with. and, unfortunately, we lost control. and now it's loose in the jungle, threatening our facility. we've had to evacuate all personnel from the island for their own safety.q

How I found the answer:

The first step was noticing that the spacings and punctuation seemed to be random based on, e.g., these lines in the third message of day 1, which contain the same long strings of letters with different spacings and punctuation:
"jia utj qhdz? Er btebbqf zj iautjq, ehvizd xqf mteu ebrjadfeie dxr. Afahxr jbjj"
"anjirnj iautj qh dz erb teb bq fzji autj qgapi xplqfmt eueb rjadfe. Iedx rafah xrjb jf"

Then I noticed that the messages all have an even number of letters and all the repeating patterns I noticed within the messages like the ones above seemed to start so that they all had even or all had odd number of letters before them. So I decided to arrange the letters into groups of two.

Then counting the frequencies of every two-letter combination and arranging them into a table, it was easy to notice a pattern where (converted to a numerical value) anything >6 mod 10, >60 mod 100 and >600 mod 1000 would have no occurrences in the messages. This left (at most) 216 possible combinations, which were too many for simple one-letter substitution but too few for any two-letter substitutions.

I tried to find some other base 36 ways to substitute the two-letter combinations into letters until I figured out that rearranging the three-digit numbers into two-digit ones would also give base 36 to work with and after that it was simple enough to find the correct substitution cipher for the numbers.

$\endgroup$
  • $\begingroup$ Correct, good job! I suggested an edit where I tried to add spoiler formatting - I didn't do a very good job though. Could you elaborate on how you found the answer? Also, there's a reason why aa, ab, etc. equal what they do, and it also has something to do with number bases. $\endgroup$ – Stephen S Jul 26 '17 at 1:18
  • $\begingroup$ (1) I’ve tried to improve the formatting a little. (2) Can somebody explain how this works?  For instance, I guess that 1+2+3=Day 1, 4=Day 2, and 5=Day 3, but I have no idea whether that’s right, and I have no idea how to even do the deciphering, even given this answer. $\endgroup$ – Peregrine Rook Jul 26 '17 at 4:39
  • $\begingroup$ And by the way, is it intended that the cipher table has two entries for 13, and none for 00, 11, 32 and 51? $\endgroup$ – Peregrine Rook Jul 26 '17 at 4:58
  • $\begingroup$ @PeregrineRook the unused numbers are symbols not present in any of the plaintexts - off the top of my head they were (, ), and I think !. Do you know Python? I'm going to put the programs I wrote to make this on Code Review. But basically, to decipher, break it into chunks of 2 letters (ignore everything else), converts each set of 2 to base 26 (add leading zeroes to make it 3 digits long), concatenate those together, break the string of numbers into sets of 2, and then substitute. $\endgroup$ – Stephen S Jul 26 '17 at 12:44
  • $\begingroup$ @​user39583 @user39586 You've answered this from one account and edited it from another - you should probably merge the two accounts together. Let me know if you'd like to do that. $\endgroup$ – Rubio Jul 27 '17 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.