Paul Kuliniewicz » bonus http://www.kuliniewicz.org/blog After all, it could only cost you your life, and you got that for free. Mon, 28 Jan 2013 03:25:49 +0000 en-US hourly 1 http://wordpress.org/?v=3.8.5 http://creativecommons.org/licenses/by-nc-nd/3.0/us/ Appendix A: Appendix C: Markov Could Write Better Than You http://www.kuliniewicz.org/blog/archives/2008/12/03/appendix-a-appendix-c-markov-could-write-better-than-you/ http://www.kuliniewicz.org/blog/archives/2008/12/03/appendix-a-appendix-c-markov-could-write-better-than-you/#comments Wed, 03 Dec 2008 12:00:34 +0000 http://www.kuliniewicz.org/blog/?p=1097 A Markov text generator takes as input a bunch of text and outputs random text that statistically “looks like” the input text. The generator chooses the next word to output based only on the previous n words that were output, matching the probability distribution found in the input text when the previous n words appear.

For no good reason, I wrote a quick-and-dirty Markov text generator and fed Appendix A into it. I’ve found that having it look at the previous 2 words works best; with just 1 word, the output tends to be gibberish, and with 3 or more words, it starts lifting entire sentences wholesale. Apparently having 3 words in a row is often sufficient to uniquely identify a point in the story.

My code is quick-and-dirty enough that it considers a “word” to be anything separated by whitespace, so “foo”, “foo,”, and “foo.” are considered three different words. Treating punctuation specially is problematic because of the difficulty in distinguishing between single-quote-used-as-apostrophe and single-quote-used-as-quotation-mark. That explains why mismatched quotes are a problem with my generated output.

Anyway, here’s a 1,667+-word bonus chapter generated by my Markov text generator, with n=2. I like to think the chapters I wrote are marginally better than this:


Between the clouds of smoke damage from the Independent Principality of Doomhammer.

Roland stepped into the hall.

“‘These days’?” Roland asked. “The Order does not understand why some people would skip out early before the Demon King should’ve been more specific,” Anna replied. “The knights have orders to stay in the windows were in the expected places. Its brown hair had been removed, revealing a ladder and towards what Anna had apparently been put together using whatever would fit. Roland lowered his voice. “Tantrums about on which side of it was actually going to say we violated the agreement, and now the nine of spades.

“I understand. Now, think carefully. Tell me everything you have, everything you know? You’re not going into this I couldn’t pass up the key to understanding the true power of the block and comes this way?”

“No,” Roland signed, chiding himself for having expected Mattias to actually have a couple towns near Doomhammer, but we’re stuck here on defense.”

“Gentlemen, please,” the man answered reluctantly. “Though I shall succeed where he sat. But would they be following us anyway? That guy, what was left of Castle Helioth, and to either side of the guards standing in the morning sun.

Suddenly, Anna lifted herself off of it. Maybe both. Say, was I right about what he looked like, but I’m staying at the Iron Flagon except under his weight. The upstairs hall was dark and grimy. He counted eight doors, and paced slowly down the hallway as we speak. But here’s what we have, and we’re going to survive that. If he does, the worst may still exist, and that whoever I summon is usually really angry by the reception. “I apologize for that. It’s a bit more awake, he noticed something out of whack. Anna was pointing and saw he was pulling you behind me, isn’t he?” Derek finished.

After a pause, he added, pointing towards the wall for a few seconds, Roland heard a crash somewhere, and the altar, and thought that the seal of the Lantarian army is probably waiting along the top card is still the top card, stared at the floor had been given.

“Yes,” Roland said, struggling to hide here. At least half of the Lady ought to be. Normal people don’t abduct children, and normal people definitely don’t fight you directly! Wreck their economy, burn down their villages, and soon fell asleep without even touching the cards. Roland doubted he would be a liability for what he was going to get back onto the bar, and someone had been correct; at the rear, keeping one hand and map to tell him.”

“You’re not aware of what had already done more than one performer could be killed by a master scribe. Roland still couldn’t read it at first, but from this angle they looked more closely. “They look fine to me.”

“Someplace where you’ll be able to land a single step. The room he found four swords pointed at him. The one time someone got close to him, he patted the cloak covering the light atop its torch.

“What happened back there I got sick to my stomach from whatever slop they were in suddenly widened, and Roland followed. “So if we waited until the very least, it took to be something that weighs heavily on your part, I will riffle through this perfectly ordinary clothes underneath.

The cloud lunged towards Roland. “Welcome to Castle Helioth.

“This is where we want to fight it off.”

“Somehow I doubt there’s going to pick me out a way to put much effort towards marketing.

“These cards are all very noble and idealistic, and I assisted her in rescuing him. I then brought the cards until he came as fast as we can, we should come to think all that time spent scraping away at the end of the stars. In practice, at any given time. It was definitely a head. Two eyes, two ears, a nose, and a perfectly good one back in town.”

“Well, we’re here,” he added wistfully.

“What things?” Roland asked.

Roland shook his head. “I’m still going to be increasingly eager to go in there and saw her extinguish her torch upward. “It looks like it’s closed.”

“You know, street performing. People do it in front of her. She swallowed nervously. “I suppose now you need anything for tonight.”

Roland could notice, Anna had been able to carry out. Roland took another half step forward finally brought Roland up and nodded to the next town. It’s just like how a gold suit of armor. Unfortunately, that was because one of the kingdom, they could usually be found in the right direction.

“Except that we was being needlessly paranoid. But if I happen to be focusing intently on the far wall. Sunrise already, yet it felt like freezing cold air. The crowd cheered their exit, and they don’t want to have me let you stay in bed for VIPs was ostensibly the “good” bed in the cell, along with a measured pace, walked up the stairs, he descended to the audience. They applauded, and more emphatic as he hadn’t lit either ever since we left Blackstone,” he answered. “Await here for a few of the room. Roland followed the group was just wide enough to call more to follow the same way that the head of the kingdom, the shrines were built as an afterthought, arriving only after Telerand had disintegrated after the fire. “You’re awfully glib about what to make trouble, but as he was surrounded by the Lady under difficult circumstances these past few weeks.”

The cheer from the deck and held it between the shops wherever possible, sometimes a soldier would fight to the main avenue thinning out a heavy sigh. As he slowly paced back and forth in front of the table said as though we were facing back then.”

Roland’s feet slid on the counter. “Your room is number 203, up the rest of the deck until the very least it didn’t need to go, because of its mind when I was kind of black smoke rose straight up from the door to the wizard intoned as Derek struck the last three deals!” the man with the village’s governor suddenly ceased. The kingdom would then send an army to fight our knights at all! Everyone knows it won’t, but orders are orders. Besides, even the slightest sign of smoke and the number with his other hand.

“I lied.” Roland looked more like a cage, trapping him metaphorically in the other.

“You don’t understand,” Anna said.

With the helmet removed, Roland saw that the Lantarians are preparing for a ring of keys. He then turned and, nodding quickly to the next person for their account.”

—-

“No, sir,” the acolyte asked.

“Hopefully it won’t come to places like this is what’s going to play fair?”

“That was incredibly brave thing you did back there, challenging the Demon King would be unwise to go up, so I suppose it’s all for now.”

“Can we stop for a few hours, it didn’t need to know how else she was standing at the time you need to light the paper on fire, preventing it from him before the guard went limp.

Dalton turned and walked around to the floor, and saw the hand of the kingdom, the bottom of the entrace to the folded cloak. With a flick of his head, and charged at him, as though someone had been in the two of them slipping away.

Anna considered this. “Fair enough. But that’s not what I heard something from her cheek. “When it was increasingly unable to support.

This time it was the armies struggled against one of our lower-tier rooms on the ground and looked up from it moments before the peasant could react, and dumped it over to see what any of the four suspected bodyguards pairing off and sitting next to Roland’s, where a particularly evil tree and his watering eyes, he had awoken in the same positions as before.

Roland assumed the guard was eying him, but it seemed like a good thing we did. None of us might by lying?” Roland asked.

“But at least wait until morning?”

Roland explained about the walls, but the only one who owes me. Anyway, next time you’re in the guest room. “I haven’t quite figured out how to play, but didn’t see any nice way to the guards, pointing at Roland. “Not that he wasn’t much looking forward to the side slightly.

The guard gestured towards the edge of the little extra time to catch them doing something about the coming war, and was turning to Anna below him, “we need to return to Castle Telerand to be enjoying it more difficult than I thought! Walls of fire, wow, that was the first place. Roland was at least one of the trick is to keep at least have washed it before wearing it, but could only come up with a couple standard devotional prayers for good measure. Taking care of myself.” She looked at Roland and Dalton stared at him with both hands. If he had rarely seen, at least start leaving each other and start working together,” a voice said from behind the table and Roland, he couldn’t delay in eating something or changing into a panic about the extra weight in the forest.”

“And you wish to exit.”

Roland passed the pair of heavy wooden cabinets with locks on the floor boards it would be much appreciated. You can accompany me that he was eating.

The other knight replied. “They’ve ordered a regiment from here to save their money for ale.

“Hopefully it won’t come to places like this is something far greater than the classic sword and shield combination. He understood the symbolism was that on that belief? To be honest with himself, he was going to stay down here to fortify defenses and to repel the inevitable second, third, or even fourth attempt to strike against another, things would peter out once one side was overwhelmed and falling like so many others had before. In his wisdom, he reached out to mine, someone like… you, sir, in the middle of the Lady under difficult circumstances these past few weeks.”


]]>
http://www.kuliniewicz.org/blog/archives/2008/12/03/appendix-a-appendix-c-markov-could-write-better-than-you/feed/ 4
Appendix A: Appendix B: Lost in the Cloud http://www.kuliniewicz.org/blog/archives/2008/12/02/appendix-a-appendix-b-lost-in-the-cloud/ http://www.kuliniewicz.org/blog/archives/2008/12/02/appendix-a-appendix-b-lost-in-the-cloud/#comments Tue, 02 Dec 2008 12:00:13 +0000 http://www.kuliniewicz.org/blog/?p=1089 For those of you too lazy to read all 30 chapters of Appendix A, here’s the word cloud version. The size of each word is proportional to the number of times it appears in the story, using a logarithmic scale. Each 4-point increase in font size roughly corresponds to a doubling in how many times that word appears.

Word cloud for Appendix A.

]]>
http://www.kuliniewicz.org/blog/archives/2008/12/02/appendix-a-appendix-b-lost-in-the-cloud/feed/ 0
Appendix A: Appendix A: Breaking the Valfeas Cipher http://www.kuliniewicz.org/blog/archives/2008/12/01/appendix-a-appendix-a-breaking-the-valfeas-cipher/ http://www.kuliniewicz.org/blog/archives/2008/12/01/appendix-a-appendix-a-breaking-the-valfeas-cipher/#comments Mon, 01 Dec 2008 12:00:22 +0000 http://www.kuliniewicz.org/blog/?p=1069 In a couple sections of the story, Roland came across written passages he didn’t know how to read, such as this one from Chapter 11:

Cotomujnubyat og mitp. Bluga ibu ti qiqevyjkis tejix at otyaju vukyff cnu opocyky ca qahvijg “huhu pi u gefxdoqw” oqq losa blu kuvrnuhn esqaib aec at kva yvwik. Ojqoqbekuivd ots gi-qoncug “hupyq jijrj” oky vaa. Ivu qoq glaec “niqex riqex” ab “opkiqoxuzbo” ak “gniiulyjv igdeckihu” eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk acnuh ngij caihyff nopu oq oreac.

Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc. Blu iroruthy eknagvj ni blek, uvr ek evrekjevux. Mev nvub ehi jyisla, ot fac avwik amrihbd ka my cotorococyr? Gaag didg rinik ikja asyjn? Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok? O rbaqigu kvub yk duv. Vwux fiigqik jvuck jikku ok kyqags at py utleirycutcg yf ngod ogai. Ufx soqkocoif.

As you may have suspected, these passages are not gibberish, but rather are encrypted text. This appendix will walk you through how to break the encryption and see what it really says. Naturally, if you want to try your hand at it first, stop reading right now.

First, you might suspect that since I have been known to solve in my head the cryptograms you’ll find in the puzzles section of the newspaper, I might have been tricky and used something more sophisticated than a mere monoalphabetic substitution cipher. But how to check? Using the index of coincidence.

The index of coincidence is a value computed from the relative frequency of each letter, and is unaffected by monoalphabetic substitution. Normal English text tends to have an IC of about 1.73. The unencrypted bulk of the story has an IC of 1.70586, which gives good statistical evidence that I wrote it in English. The IC of the encrypted passage above, however, is 1.31393, suggesting something else is in play.

From eyeballing the ciphertext, capitalization and sentence structure was presumably unaffected, so some kind of letter-based substitution cipher is probably in use. A polyalphabetic substitution cipher, perhaps? That’s like a monoalphabetic one, except there’s more than one encrypted alphabet: each successive letter is encrypted with a different key, and the keys cycle after they’ve all been used.

In other words, every nth letter will have been encrypted the same way. Let’s try different values of n, computing the IC of each alphabet. If we guess correctly, each of the ICs should be close to 1.73.

  1. IC = 1.31393
  2. IC1 = 1.33924, IC2 = 1.28099
  3. IC1 = 1.38043, IC2 = 1.31701, IC3 = 1.31579
  4. IC1 = 1.29462, IC2 = 1.20000, IC3 = 1.37243, IC4 = 1.26133
  5. IC1 = 1.57006, IC2 = 1.91897, IC3 = 1.66378, IC4 = 1.77629, IC5 = 1.77629
  6. IC1 = 1.50000, IC2 = 1.20874, IC3 = 1.23301, IC4 = 1.34466, IC5 = 1.41557, IC6 = 1.37103

If n = 5, the ICs are much closer to 1.73 than the others we’ve tried, suggesting we have a polyalphabetic substitution cipher using five keys.

Let’s give it a try:

                     .
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
                              "                  "
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
                                .                     -       "
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
     "        .                "           "    "           "
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"                   "                              ,
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
                                .
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
       ,                                                          .
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
                            ,                  .
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
      ,                                       ?
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
          ?                                 ,
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
                                                           ?
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
                   .
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
                         .               .
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
2
3
4
5

Under each ciphertext letter is the number of the alphabet it belongs to. “E” in alphabet 3 will probably decrypt to something different than “E” in alphabet 2, but every “E” in alphabet 3 will decrypt the same way. There’s room above to write our trial decryption, and at the very bottom is the key we’ve recovered for each alphabet, with the plaintext alphabet at the top.

Where to start? Look for words in the ciphertext that we can safely guess the decryption of, and try it out. “E”/2 is probably “I”, and “u”/4 is probably “a”. If you were smart you’d recognize that “O”/4 would be “I” and not “A”, since we’re already guessing that “u”/4 decrypts to “a”. (Unfortunately, I was not that smart when breaking it myself.) Also, from the context in which the passage appears in Chapter 11, it’s a good guess that “Valfeas” appears somewhere. It’s either “Niniryb”/5123451 or “Vonmuok”/2345123, as those are the only two capitalized seven-letter words. We’ll guess it’s the latter, since the former would mean “r”/4 becomes “e”, and there’s very few “r”/4 in the ciphertext whereas “e” is very common.

Making those substitutions, we get:

 a  fe  a            .                                   a
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
 a       e a                  " a e    a         " a    a
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
sa                              .     a         a     - al e  " a
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
     " a      .    e  a        "           "    "a    a a  a"
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"    a        i     "               l e i    e  a  ,  i
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
o  e               l    a    i  .
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
       ,   a   a     a          f     e       s      al ea     is .
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
                          is, a   is    is     .        a
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
      ,                             a     a   ?
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
          ?      I            i l    a      ,      a
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
a                                            i l    Valfeas?
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
      e   a      a .                 a       e as
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
a  i                 a   .  E       a    .
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1      U
2  O       E            V
3  O                 K
4  U          N
5       M

So far, so good. Next, see if the letters we’ve guessed suggest any more good guesses. A dictionary search comes in handy here when we have long words with a few known letters, to see how many possible choices we have. For example, we see “onjuoxy”/3451234 is “al?ea??”, which must be “already”. “cnu”/451 is “??e” and appears twice, so that’s probably “the”. Likewise, we see “acnuh/34512″ is “???e?”, and with the guess for “the”, this must be either “other” or “ether”, so “h”/2 is “r”. And yes, here’s where I noticed where “O”/4 must be “I”.

With those new substitutions:

 a ife  a     i      .                                   a y
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
 a     the a i     t          " a e    a    d    " a    a
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
sa     h          t             .     a         a     - al e  " a
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
  r  " a      .    e  a      t "h          "    "a    ada  a"
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"    a        i     "               l e i  the  a  ,  i
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
 ther              l    a    i t.
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
H      ,   a   a i   a          f     e       s th   already   ist.
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
                          is, a   is    is    d.        a   r
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
      ,      t                      a i   at  ?
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
          ?      I            i l    a      ,      at
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
a       d            ir                      i l    Valfeas?  I
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
      e   a      a .                 a       e as
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
a  i      t          a   .  E d     at   .
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1      U
2  O       E        H   V
3  O                 K
4  U       I  N       C    Y
5       M N         J

Let’s try dictionary searches against some of the longer words. We find that “Cotomujnubyat”/1234512345123, currently “?a?ife??a????”, can only be “Manifestation”. Likewise, “opkiqoxuzbo”/23451234512, currently “a????ada??a”, can only be “abracadabra”. That gives us lots more letters:

Manifestation i    n .  T      r  n               s      any
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
 a i   the abi i   t  co  a   " a e    a    d  c " a    a   t
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
sa     h     ar o t            r.     a t       an    - al e  " a i
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
  r s" ar   o .    e  a    o t "h          "  r "abracadabra"  r
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"    a is     i r   "   ti      is bl e in the  a  ,  it         c
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
other t a      i   l    a    i t.
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
H     r,   at ma i  can    is   f     e ob  c s th   already   ist.
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
T        n     t   s t  t is, a   is    is    d.        at  r
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
      ,      t     r      t        mani   at  ?                r
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
a s    ist?   a  I     s      i l    an t   ,      at t   r ac
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
a       dr   n       ir   n      b t    t    i l    Valfeas?  I
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
 ro   e   at i   a .            a  s a   s r e as r co
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
a  i   m nt  i  t    a  a.  E d   c at   .
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1    Q U   Y   C    B
2  O       E     A  HJ  V
3  OP           T    KN
4  U       I  N     K C    Y
5  IZ   M N         J B

If we pause now to look at our key, we notice a curious thing: vowels are only encrypting as vowels, and consonants are only encrypting as consonants! Those kinds of substitution keys result in ciphertexts that are somewhat pronounceable, in that they always have vowels in them, but it makes guessing words even easier.

Using that observation to guess that “apbyqkk”/2345123 is “objects”, “cotorococyr”/12345123451 is “manipulat??” (-ed, -es, or -or, we don’t know yet), “otiblug”/2345123 is “another”, “kyqags”/451234 is “record”, “utleirycutcg”/451234512345 is “achievements”, “ab”/51 is “or”, “ak”/34 is also “or”, “pneu”/3451 is “blue”, and “kuvrnuhn”/34512345 is “sandwich”, we get:

Manifestation is   n .  Ther   re no      e ted c se  o  anyo e
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
 a i   the abi it  to co  a   " a e  e a s  d  c " a   ha   the
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
sandwich     ar o t o  t   e  er.     a t tion  and s - al e  " a i
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
 ords" are  oo.  One  a  sho t "h     p    " or "abracadabra" or
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"s  ea is  os i r  e"   til o e is blue in the  ace,  it  n  e  ect
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
other t a  loo i   l  e a   diot.
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
H wever, w at ma ic can  o is i f  e ce objects th t already e ist.
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
The ev dence  tt s s to this, and is   dis   ed.   u  w at  re
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
 e    ,     ot o  er o  ect  to  e manipulated?   o s      p wer
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
a so   ist?  Ca  I i p se     i l o  another,  o   at their action
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
ar  n t dr  en      eir  wn    l b t    t e  i l o  Valfeas?  I
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
pro ose t at it  an.    i     r a  s a   ser e as record o
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
achievements i  t    ar a.  E d d ctat   .
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1    QRU  LY   C    B  O
2  O   U   E  C  A  HJK VN
3  OP  I   U    TA  GKN
4  U HS    IB N  I  K C R  Y
5  IZT YM N     V R JGBE

At this point you can almost start reading fairly large fragments, making the rest of the guesswork easy enough to be left as an exercise for the reader. Going through methodically, guessing obvious words and filling in the extra letters, we eventually get:

Manifestation is bunk.  There are no documented cases of anyone
Cotomujnubyat og mitp.  Bluga ibu ti qiqevyjkis tejix at otyaju
1234512345123 45 1234   51234 512 34 5123451234 51234 51 234512
 
having the ability to command "make me a sandwich" and have the
vukyff cnu opocyky ca qahvijg "huhu pi u gefxdoqw" oqq losa blu
345123 451 2345123 45 1234512  3451 23 4 51234512  345 1234 512
 
sandwich appear out of the ether.  Incantations and so-called "magic
kuvrnuhn esqaib aec at kva yvwik.  Ojqoqbekuivd ots gi-qoncug "hupyq
34512345 123451 234 51 234 51234   512345123451 234 51 234512  34512
 
words" are too.  One can shout "hocus pocus" or "abracadabra" or
jijrj" oky vaa.  Ivu qoq glaec "niqex riqex" ab "opkiqoxuzbo" ak
34512  345 123   451 234 51234  51234 51234  51  23451234512  34
 
"squeamish ossifrage" until one is blue in the face, with no effect
"gniiulyjv igdeckihu" eqbyc aqy yj pneu et cnu zohy, geng vi uczyqk
 512345123 451234512  34512 345 12 3451 23 451 2345  1234 51 234512
 
other than looking like an idiot.
acnuh ngij caihyff nopu oq oreac.
34512 3451 2345123 4512 34 51234
 
 
 
However, what magic can do is influence objects that already exist.
Niniryb, nvub cofot qot sa yj uqmkiiqtu apbyqkk cnek onjuoxy ysekc.
5123451  2345 12345 123 45 12 345123451 2345123 4512 3451234 51234
 
The evidence attests to this, and is undisputed.  But what are
Blu iroruthy eknagvj ni blek, uvr ek evrekjevux.  Mev nvub ehi
512 34512345 1234512 34 5123  451 23 4512345123   451 2345 123
 
people, if not other objects to be manipulated?  Does such power
jyisla, ot fac avwik amrihbd ka my cotorococyr?  Gaag didg rinik
451234  51 234 51234 5123451 23 45 12345123451   2345 1234 51234
 
also exist?  Can I impose my Will on another, so that their actions
ikja asyjn?  Hij E uvriji vu Geln aj otiblug, xa vwoc bluuk iqkuivd
5123 45123   451 2 345123 45 1234 51 2345123  45 1234 51234 5123451
 
are not driven by their own Will but by the Will of Valfeas?  I
oga vik xkofut mu vwioj int Dokc peb my ngy Geln at Vonmuok?  O
234 512 345123 45 12345 123 4512 345 12 345 1234 51 2345123   4
 
propose that it can.  This journal shall serve as record of my
rbaqigu kvub yk duv.  Vwux fiigqik jvuck jikku ok kyqags at py
5123451 2345 12 345   1234 5123451 23451 23451 23 451234 51 23
 
achievements in this area.  End dictation.
utleirycutcg yf ngod ogai.  Ufx soqkocoif.
451234512345 12 3451 2345   123 451234512
 
 
 
P  ABCDEFGHIJKLMNOPQRSTUVWXYZ
1  EMQRUTHLY PKCJI NBDVOFGS
2  O QGUZ WER CPFAS HJKIVN Y
3  OPDFI FVU  LHTAQ GKNESJ Y
4  UMHSAZ GIBPNVQIJ KXCERD Y
5  IZTQYMPNOFHCLV R JGBEK SU

Let that be a lesson to you: if you don’t want someone reading your messages, use something stronger than a polyalphabetic substitution cipher. Too bad Valfeas didn’t know about AES. But since he apparently didn’t realize that squeamish ossifrage are, in fact, magic words, perhaps he can be forgiven for not being caught up on modern cryptography.

]]>
http://www.kuliniewicz.org/blog/archives/2008/12/01/appendix-a-appendix-a-breaking-the-valfeas-cipher/feed/ 0