Tuesday, July 27, 2010

Tsianina's cryptogram journal

I've recently taken up a second character, or "alt", in Lusternia, in part to break up some of the less pleasant things about my main character's life and circumstances, and in part to explore some intriguing things about one of the cities (but which wouldn't suit my main character at all). My new character is a scientist, and a gangly, geekish one. I'm modeling her personality on a mishmash of similar characters and stereotypes, including some things from the Venus Equilateral stories, and a few elements from Big Bang Theory.

But I'm also including a few elements solely so that I can fit them into Lusternia, and be able to do the stuff in Lusternia I want to do. One thing is I like writing, but I also like earning goodies for my writing. Lusternia's bardic contests do accept non-fiction pieces, but they very rarely win, and the more dry and scientific, the less likely to win. So I decided to make this character have a penchant for word puzzles, though she treats them as no big deal, just something she does to while away the boring times. She creates word puzzles and leaves them for herself to find a year later, when she can solve them since she no longer remembers them. Puzzles have some chance of scoring in the bardics, as long as I make them uniquely Lusternian.

Following from that, and her tendency to be constantly scribbling notes and diagrams in her journal, I decided that she does her entire journal in cryptograms. Even the little notes are jotted in code. Not so much to keep things secret as to give her something to do. Whenever she goes back to her notes she has to solve the cryptogram to read them. She doesn't write down the ciphers, either. But since you can't always solve the cryptogram on a very short note, she needs a "safety hatch" so she won't lose her notes. Plus she might need to read them quickly.

I solved this by developing an algorithm by which she uses the title of a piece to create a cipher. Thus, every piece, whether a short note or a lengthy dissertation, has a title, which is written in plaintext. The algorithm to produce a cipher from the plaintext of the title is consistent, and produces a unidirectional, asymmetric cipher (that means, if T in plaintext becomes R in ciphertext, R in plaintext does not necessarily produces T in ciphertext, so applying the cipher twice won't give you back the plaintext). It uses all the letters (but isn't case-sensitive) plus the digits, but not punctuation, so it has 36 elements.

Since the cipher is determined by the title, she can always use the title to create the cipher, then reverse the encryption, fairly quickly and with complete reliability.

I decided it would be more fun if I actually did this and wrote in her journal that way. So after doing a little bit of the encrypting by hand to make sure I could, I wrote a program in C which generates the cipher and then enciphers the plaintext with it. This is now what the first page of her journal looks like (just the start, it goes on at some length):

               Project: Conjunction

Sfesu1g: Zu yfjnz5av j1zeu7upv 5nzu j 1c5gncg jn4 5nzgpejzg 5z i5zh ufe fn4ge1zjn45np ua jgun5c1 jn4 zgdsuej7 shv15c1, zu 5dseuqg ufe fn4ge1zjn45np ua j1zeu7upv jn4 5ncegj1g 5z1 gaagcz5qgng11.

Nuzg zhjz zhg gaagcz1 ua 0u4v ejv1 4gsgn4 un zhg zjepgz'1 njz5q5zv 5n j ijv ih5ch 51 j7egj4v aj5e7v ig77 fn4ge1zuu4, jn4 zhf1, zh51 51 ufz154g zhg 1cusg ua zh51 seumgcz. 5n 7jzge shj1g1, zhgue5g1 j0ufz zhg cjf1g1 ua zhu1g gaagcz1 d5phz je51g j1 j njzfej7 154g-gaagcz ua zhg seucg11.


U0mgcz5qg: Cegjzg j cj7gn4je zhjz 4gdun1zejzg1 zhg cvc7g1 ua duz5un ua zhg s7jngz1 jn4 0u45g1, 1fch zhjz ig cjn auegcj1z zu jnv je05zejev 4jzg 0v cj7cf7jz5un zhg 1jdg 5nauedjz5un zhjz iuf74 0g seuq54g4 0v jn j1zeu7j0g.

Dgzhu4u7upv: Djkg egpf7je u01geqjz5un1 jz zhg j1zeu7j0g jn4 egcue4 zhgd. J1 5z i577 nuz 0g su11507g zu 0g jz zhg j1zeu7j0g gqgev 4jv, zhg 4jzj i577 hjqg pjs1, 0fz 5z 51 gbsgczg4 zhjz gjch 0u4v i577 hjqg cvc75cj7 sjzzgen1 ih5ch i577 gqgnzfj77v gdgepg, j77ui5np ejnpg1 ua cheunu7up5cj77v 1gsjejzg4 4jzj zu 0g fn5a5g4. Zh51 gaauez djv zjkg djnv vgje1, 15ncg 5z 51 knuin zhjz Jjsgk'1 zejn15z 51 dueg zhjn j vgje jn4 1gqgej7 cvc7g1 djv 0g egyf5eg4 zu a577 5n j77 zhg pjs1.

Cuna5edjz5un: J1 gjch cvc7g 51 54gnz5a5g4, seg45cz5un1 cjn 0g auegcj1z 0j1g4 un zhjz cvc7g, zhgn cuna5edg4 jz zhg j1zeu7j0g. Ihgn j cuna5edjz5un zg1z aj571, 5z i577 cegjzg ngi 4jzj aue jnuzhge jzzgdsz zu 54gnz5av zhg cvc75cj7 sjzzgen. Ihgn j sjzzgen hj1 0ggn cuna5edg4 un df7z5s7g uccj15un1 1gsjejzg4 5n z5dg 5z i577 0g j11fdg4 zu 0g cueegcz (zhufph cunz5nfg4 cuna5edjz5un1 i577 gn1fg zheufphufz zhg afezhge shj1g1).

This is eminently solvable -- even more if you consider what words are likely to lead sections in a research project proposal -- but certainly it would take more work than it's worth for most people to solve. I hope that this comes across to people as an interesting character trait instead of just an annoying one.

(Incidentally, Project: Conjunction is a research project she's planning to propose that will attempt to quantify and make scientifically analyzable the skill of astrology, which in Lusternia is a real thing, and not about fortune-telling. The above is just an abstract of the purpose, plus the first of six phases.)

Incidentally, the algorithm for generating the cipher is to use just the letters of the title, and turn them into numbers, where A is 1 and Z is 26. Repeat the title as many times as needed. So "Project: Conjunction" becomes 16 18 15 10 5 3 20 3 15 14 10 21 14 3 20 9 15 14 and then repeats. Now, set up a cipher as follows:

Plain : 0123456789abcdefghijklmnopqrstuvwxyz

The first number is 16, so count right 16 steps (placing you under the F in the plaintext) and put an A. The second number is 18 so count right 18 steps and place a B where you land (this time under the X). The third number is 15 so count right 15 steps, wrapping around when you reach the end, and place a C (this time under the C -- as it happens, Cs don't get converted). Continue this, but if you reach a spot where there's already a letter, keep shifting right until you find an empty one. Place all the letters, then all the digits. The result for the title "Project: Conjunction" is this cipher:

Plain : 0123456789abcdefghijklmnopqrstuvwxyz
Cipher: 892w6lxotrj0c4gaph5mk7dnusye1zfqibv3

No comments: