Qhrfa ygu tgm viniqifs dy weoniqe rfk merkifs dy rmqicbe. Rfk r njecirb qhrfan rn ygu qgga qhe qide qg kecgke qhin dennrse ygu rme fgw merkifs. Ygu rme rwengde.

Oh sorry, I forgot to disable my encryption.

The Lady Astronaut

The Lady Astronaut books are about an alternate history. One where a big meteorite strikes earth in the 1950s, a time where computers were still people that ran calculations. The punchcard fiction story (as the writer beautifully calls it) unfolds from there. At some point in the second novel, the main character Elma sets up a secret way of communicating with her husband, Nathaniel. She does so using a keyed Caesar cipher encryption.

The messages are shown in both the encrypted and decrypted versions. I thought it would be fun to build a Python script and see if the messages in her book are properly encrypted and/or decrypted.

Keyed Caesar cipher encryption

A keyed Caesar cipher encryption is easy to understand. It works like this: you pick a word, for example rocketships. You then generate an encrypted alphabet based on the word. The encrypted alphabet starts with the unique characters of the word you’ve picked, in order of appearance. So for rocketships it would be rocketship (note how the last letter ‘s’ is removed, as it is a duplicate). The encrypted alphabet would be:

rocketshipabdfgjlmnquvwxyz

Using rocketships as the encryption keyword, I can translate a sentence into a secret encrypted message. For example:

I really like the Lady Astronaut series. Although, at the time of writing this post, I’ve only read two of the three novels.

Becomes:

I merbby biae qhe Brky Rnqmgfruq nemien. Rbqhgush, rq qhe qide gt wmiqifs qhin jgnq, I’ve gfby merk qwg gt qhe qhmee fgvebn.

Pretty fun right?

The secret messages in The Fated Sky

Now the fun part was reviewing the actual messages in the Fated Sky, the second book in the Lady Astronaut series. And I found something interesting in three of them.

Two of the findings were related small mistakes (I think):

  • p 195: the first two lines of the message “Parker […] and” are not part of the encrypted message. They do show up in the decrypted message.
  • p 233: the message by Nathaniel is encrypted with rhinoceuos. I think the writer accidentally made a typo when encrypting this message.

But this one was pretty fun to figure out:

  • p 196: the end of the second line “If you were here…”, well… it is a bit more explicit if you decrypt it! I had a good laugh when I figured that out.

The funny thing is that the main character decides not the share the whole decryption of that line in the book with the reader, as it is only intended to be read by her husband. Well, now both Nathaniel and I know what was said there. But don’t worry Elma, I won’t tell anyone.

Try it yourself

If you want to give encryption using Caesar cipher a try in Python, you can visit my GitHub repository and give it a try.