Pigpen Ciphers
Image by Justin Leonard on Flickr
Pigpen ciphers uses alien-like symbols to hide secret messages.
Last issue, we explored the simple substitution cipher to create a basic yet efficient code to use with your friends and family. This week, we’ll explore something a little more fun; using the Pigpen Cipher which uses alien-like symbols to share messages with people in the know. What looks like meaningless and bizarre shapes is actually a secret code transmitting sensitive information!
The Pigpen Cipher has a strange name, but there’s a reason behind it; the idea is that you assign each letter of the alphabet to a specific shaped bracket, or ‘pigpen’. When you go to write your secret message, instead of writing normal letters, you instead write the bracket that each letter ‘lives’ in. Everyone else sees strange bracket symbols, but those with the cipher’s key can translate the brackets back into letters and solve your secret message!
So, let’s get to making a pigpen cipher. First, draw out 26 different ‘pigpens’ for your code to use, and assign a letter to each one. Make sure each pigpen looks different to the other pens. To make things easier, you can repeat the basic shape of a pen but add a symbol or a marker to differentiate it from the others. Here’s an example of a basic pigpen cipher:

Remember you don’t have to follow the above example if you don’t want to! If you can think of more interesting shapes to use, feel free to invent your own. Just remember to ensure no two pens look identical, or decoding messages will be very difficult.
Now that we have our cipher, it’s time to make a coded message. First, work out what you want your message to say. For this example, let’s keep it simple and say we want to transmit the word “ANT”. What we do is locate each letter and note the shape of the ‘pigpen’ that’s around it. For instance, A is inside a backwards L, N is inside a box with a dot near the bottom, and T is in a V turned on its side.

Once you’ve found what pen the letter is, you write your message down by drawing the shape of each pigpen, rather than the letter itself. If you’re using dots like I am, make sure that you don’t forget to add them into your code, or else things get very confusing! To spell ANT, we’ll write the word like this:

When someone with the code’s key receives your encoded message, all they have to do is look for the pigpens in the cipher and note the letter that’s within it. They’ll see the backwards L and write A, then the box with a dot for the N, and a sideways V for the T. Success — our message was delivered!
In a way, this code is about making an alternate alphabet and making messages by translating English words through it. As such, it makes it quite easy to crack, but has the added benefit of not looking like regular letters at all. This means you can hide them away from prying eyes and nobody will suspect you’re sending messages. Disguise them as a decorative pattern, hide them in images, make them look like random scribbles; the possibilities are endless!
Now it’s your turn. Let’s pretend we’re going to talk to a friend about meeting up later, and we both have the cipher key to encrypt and decrypt messages. Using the cipher we defined above, how would you write the following sentence?
WHEN SHALL WE MEET
Once you sent your message off, your friend replies with the following message. What are they trying to say?

Answers
You spell “WHEN SHALL WE MEET” like this:

The friends message says: LETS MEET AT FIVE
Learn More
Science Museum’s Investigation of Pigpen Cipher
http://www.sciencemuseum.org.uk/pdfs/4.1.1%20The%20Pig%20Pen%20Cipher%20247KB.pdf
Text-to-Pigpen Converter
https://cryptii.com/text/pigpen
Pigpen Decoder
http://www.dcode.fr/pigpen-cipher
The Elian Script – An artistic code derived from the pigpen cipher
http://www.ccelian.com/ElianScriptFull.html
Pigpen Cipher – Wikipedia
Also In The October 2017 Issue

Building and creating your tools with the Minecraft toolbox helps you survive the game.

Sensors give robots the senses humans have.

30+ ideas for all age holiday gifts, from books to apps to board games to VR and more.

There might be a reason that too-real robot and video game character creeps you out.

You computer mouse cursor finally gets a cat to chase it.

Create turtles with Python, the programming language.

This programming language uses colors instead of text and punctuation to add and perform other tasks.

Use micro:bit to water your plants!

Knowing how passwords are cracked can help you create better passwords.

Studying satellite photographs shows a lot about what happens in the world.

There are a number of strategies teachers (plus parents and students) can take to learn programming.

Pigpen ciphers uses alien-like symbols to hide secret messages.

This project uses conductive thread to create a glove to activates your phone.

The repl.it website and React are one way to create mobile apps.

Software programming does neat things with language, in this case, mixing capital letters.

This Scratch game has lots of ways you can customize the game play. No cats were harmed in the making of this article either.

Links from the bottom of all the October 2017 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for October 2017.