Pigpen cipher is a simple substitution cipher that works by replacing each letter of the message with a symbol. In pigpen cipher, each letter is assigned to a symbol based on where the letter is located. For example, A is inside a backward L, N is inside a box with a dot near the bottom, and T is in a V turned on its side.
It goes with other names like (masonic cipher, Napoleon cipher, and tic-tac-toe cipher).
- Read: What is a cipher.
A brief history of pigpen cipher:
The origin of this cipher is not known or whoever invented it but it has been used for a long time.
- Read: Complete list of ciphers.
Here are the groups of people that used this cipher:
- Freemasons, the secret society in the 18th Century.
- Union prisoners in Confederate camps during American Civil War.
Basically, the pigpen cipher uses symbols to share messages. The bizarre shapes are secret codes for transmitting information without getting detected easily.
Pigpen code is the most popular secret writing alphabet in the history.
Here are six most popular uses of pigpen code:
- Encrypted gravestone inscriptions.
- Encrypted certificates.
- Encrypted testaments.
- Mug inscriptions.
- Beer labels.
- Encrypted treasure maps.
Are you interested in finding out more about ciphers and codes?
The Codebreakers – The Story of Secret Writing book by David Kahn is what I would start with.
In this guide I will be discussing the following:
- How to solve the pigpen cipher.
- Various pigpen cipher variants.
How to solve pigpen cipher
How to encrypt using pigpen cipher
Generally, with this cipher you turn each letter of your message into its symbol equivalent based on this grid:
All you have do is replace each occurrence of a letter with a given symbol.
Here is an example:
Plaintext: Who do you think invented pigpen cipher.
Am going to use the grid above to form the symbols associated with each letter in my message to encrypt it.
How to decrypt pigpen cipher
Decoding is equally simple, you need to locate the symbol depicted in the ciphertext and replace it with the letter given in the grid above.
Try out the following example to enhance your understanding of pigpen cipher:
Plaintext: Pigpen is the best symbol substitution cipher.
If you need more help there are a few online tools that will help you learn more about this cipher
Here is a tool to decrypt/encrypt PigPen automatically.
Are you interested in learning how to break codes?
The Elementary Cryptanalysis – A Mathematical Approach book by Abraham Sinkov is what I would recommend.
Various pigpen cipher variants
Here are three most common variants:
a) Changing the order from grid, grid, X , X to grid, X, grid, X:
b) Placing the letters alternatively the dot and non-dot parts to split adjacent letters:
c) Using three grids, and using either a full stop or space o occupy the last position:
As you can see pigpen code is about making a kind of alternative alphabet and making messages by translating words through it.
Since pigpen is an also a monoalphabetic substitution cipher, it’s very prone to cryptanalysis and breaking it is extremely easy.
- Read: Caesar Cipher.
Due to its simplicity, the pigpen cipher has been included in several children’s books that talk about ciphers and other secret codes writing.
How to recognize PigPen ciphertext
The encoded message is made from symbols with right angles which some time has a dot (1 symbol out of 2 has a dot).
The message has a maximum of 26 distinct characters.
What are the variants of the Freemason’s PigPen cipher
There are multiple variants that associate symbols and letters. Most popular variants have been proposed in the video game Assassin’s Creed.
Also. The Knight Templars cipher is very similar and has symbols very close.
Why this cipher is named Pig Pen
Symbols can be assimilated into pens and dots could be interpreted as small pigs.