Pigpen

The pigpen cipher, also called the Freemason's cipher, Napoleon cipher, and masonic cipher, is a substitution cipher used at least since the 18th century, employing a tic-tac-toe-like grid to represent letter symbolically.

History
While the exact origin of the pigpen cipher is unknown for certain, it is theorized to have an origin somewhere in the era of the christian crusades, dating it to around the 11th century. Additionally, use of something similar to the modern day cipher has been described as early as the 16th century, most notably by Cornelius Agrippa in his account of Jewish Kabbalah. His writing would imply that it was not actually used for cryptography, instead using a 9-celled grid system with the Hebrew alphabet as a form of religious symbolism. Because of this, distinct proof of the cipher being used for cryptography purposes only dates back to the 18th century.

The earliest confirmed use of a pigpen cipher is by the Freemasons, who encrypted many of their documents and correspondences using the system beginning in the early 1700s. This practice also extended to stone carvings, such as gravestones of deceased masons (the earliest being from 1785, with a carving reading "memento mori"); the practice worked well with the code, as the use of only straight lines and dots allowed for easy transferal to stone via chiselling.

The cipher was also popular with the Rosicrucian Order, although what's known today as the "Rosicrucian Cipher" is actually a variation on the traditional Masonic pigpen cipher.

The most recent historical use was by the Union Army during the American Civil War. A variant was developed that used an additional layer of alphabetic substitution, allowing for an extra level of encryption on Union messages. This ended up being a good call, as the cipher was primarily used by Union soldiers who had been taken prisoner by the confederates.

Since then, however, the cipher has fallen out of favor, primarily due to a lack of actual crytographical security. As the symbols are a 1:1 substitution for letters, even if one wasn't aware of the basic premise the code could be cracked via basic cryptanalysis. If one was aware of it, then it breaks down further, as anyone who gets ahold of the message can simply look up the key (assuming no additional layers are added).

Modern use is primarily in popular culture, with the code showing up in Dan Brown's The Lost Symbol, promotional material for BBC's Sherlock, and the video game Assassin's Creed II, with varying levels of mystery surrounding them.

Puzzle Application
The default version of the pigpen cipher involves two 3x3 open-ended grids and two X-shapes. The 26 letters of the Latin alphabet are placed in reading order, one per space, into the grids, and then the Xs. Then, the grid and X containing the later portions of the alphabet get a dot added to them, allowing for differentiation between the two otherwise-identical shapes. To write using pigpen, one simple replaces letters with the borders around them in the cipher key. For example, the phrase "X MARKS THE SPOT" would be encoded as follows: Spacing is kept between words, meaning that the pigpen cipher operates functionally the same as any other simple substitution cipher. The benefit of its use in puzzle hunts, however, is that it's relatively well-known, and it has a set key. This means that it gets used as an additive on top of other puzzle types, rather than being the entire basis for a puzzle itself (like cryptograms often are).

The cipher's graphical nature, particularly the multiple planes of symmetry present in the key grids, makes it possible for text written in pigpen to be viewed differently depending on the orientation of the viewer. For example, an A to one person may look like an I to someone sitting across from them (or a G to a person sitting on their left, or a C to one sitting on their right). The cipher can also be used non-explicitly, which is of particular use in hunt puzzles. Due to their graphical nature, the symbols representing letters can also be described verbally, often without revealing their true nature. Similarly, puzzles involving travelling a particular path can result in valid pigpen letters, although assuming one stays along a singular path the dotted letters may become a bit of a problem to create. Nevertheless, pigpen even in its default state remains a very versatile puzzle element.

Variations
As a substitution cipher with a historical basis, pigpen of course has some prominent variations. The most notable of which is the Rosicrucian Cipher, which (instead of two grids and two Xs) employed a single grid, with letters assigned to variable placement of a dot within each grid space. Letters were spread three-to-a-space, with ABC going in the top left, DEF in the top middle, and so on.

Another notable variation is the Knight's Templar cipher, which has two primary versions, both of which resemble the Pigpen Cipher to some degree. One version utilized a single X, a 2x3 grid, and one lone box. Additionally, rather than using dots to denote differences between identical grid shapes, it used the Greek letters omicron, delta, and alpha within the grid shapes.

The other version of the Knight's Templar cipher uses variations on a Maltese cross, with 7 cross-based diagrams being utilized. The first three diagrams would cover the letters A through M (skipping J), with a single X being reserved for N, followed by the remaining letters assigned to the same three diagrams but with dots added.

Identification
When pigpen is used explicitly, it's not at all difficult to identify. However, as soon as the puzzle involves recognizing concealed usage of the cipher, ID can become a challenge.

If a puzzle involves drawing paths or travelling, keep an eye out for right angles and mention of dots. Alternatively, it's possible that a navigation puzzle involving travelling through rooms with varying numbers of walls will involve the cipher. As soon as a puzzle like this mentions objects (particularly round ones) in the center of a room, start mapping out the rooms and comparing them to the cipher key; there's a very high chance it'll match up.

Another good way to tell if a puzzle uses pigpen is to keep an eye out for pigs and pig-related keywords. This includes ham, bacon, sty, pork, and hog. Additionally, watch out for the names of well-known pigs, like Wilbur, Babe, Snowball (and all of the other Animal Farm pigs), Orson, or any other name from this list.

Solving
In most cases that involve a pigpen cipher, the decoding of the ciphertext will be the end (or at least most) of its use in the puzzle.

The most common twist to defy this is to have a perspective-based puzzle, wherein ciphertext is presented in a format that allows for multiple interpretations based on the direction one is reading it from. In particular, if a large amount of pigpen symbols is presented to you (whether it's in the form of a letter grid, word search-style, or just a large number of individual words), try looking at them from angles other than the original presented one. Upside down is a good first try, with sides being less common.

Notable Examples

 * - Similarly to a later puzzle from the 2020 MIT Mystery Hunt, the pigpen-based wordsearch requires solvers to
 * - While not involving a whole lot of actual decoding of pigpen, it does require solvers to