I blog about Ruby on Rails, coding, and servers

Cryptolalia, for Creating Cicada 3301 Ciphertext Puzzles

Reading time 4 minutes

After reading yet another article on Cicada 3301 on Hacker News a few weeks ago, I was struck by inspiration. If I wanted a whole gaggle of people on the Internet to compete for – well, for some unknown goal – apparently all I needed was ciphertexts of arbitrary complexity and arcane places to hide them. Arcane places I had, but what I didn’t was a good way to generate all the sorts of codes that Cicada 3301 employed.

So I decided to make it.

cryptolalia is a Ruby gem that allows the creation of arbitrarily-complicated ciphertexts from plaintexts. At release, it has the following ciphers:

atbash inversion - an alphabet substitution cipher that replaces every character in the plaintext with its opposite character in the target alphabet.

Beale homophonic substitution - for every letter of the plaintext, finds a word in a source text beginning with that letter, and adds its position in the source to the ciphertext.

Caesar - the simplest alphabet substitution cipher, rotate each letter of the ciphertext through a chosen alphabet.

Pollux - translate the plaintext into Morse code, and chooses dot, dash, and separator symbols from an arbitrarily complex alphabet.

PNG Steganography - encode your plaintext in an image, either in its comments or least-significant bits.

Vigenere - a very complicated alphabet substitution cipher that takes a keyword and rotates each letter of the target alphabet based on the keyword and the plaintext.

You’ve probably seen most of these ciphers before. But they become way more difficult to decode if you choose weird alphabets, Victorian-era source texts, and long-dead numeral systems. Combine these ciphers with excellent placement and you too can take the cryptography world by storm!

Josh Symonds performs devops and server wrangling on cloud-scale infrastructures, deploys amazing web applications with Ruby on Rails, and creates awesome iOS apps with Objective-C and RubyMotion. He is founder and CTO of Symonds & Son, a development shop focused on quality and excellence.