| The Pigpen Cipher |
Introduction
The pigpen cipher (sometimes referred to as the Masonic cipher, Freemason's cipher, or Rosicrucian cipher) is a geometric simple substitution cipher which exchanges letters for symbols which are fragments of a grid. The example key shows one way the letters can be assigned to the grid.

Security
The use of symbols is no impediment to cryptanalysis, and this system is identical to that of other simple monoalphabetic substitution schemes. Due to the simplicity of the cipher, it is often included in children's books on ciphers and secret writing.
Variants
The core elements of this system are the grid and dots. Some systems use the X's, but even these can be rearranged. One commonly used method orders the symbols as shown in the above image, ##XX. Another commonly used system orders the symbols as #X#X. Another is ###, with each cell having a letter of the alphabet, and the last one having an "&" character. Letters from the first "#" have no dot, letters from the second each have one dot, and letters from the third each have two dots. Another variation of this last one is called the Newark Cipher, which instead of dots uses one to three short lines which may be projecting in any length or orientation. This gives the illusion of a larger number of different characters than actually exist.
Another system, used by the Rosicrucians, used a single "#" grid of nine cells, and 1 to 3 dots in each cell or "pen". So ABC would be in the top left pen, followed by DEF and GHI on the first line, then groups of JKL MNO PQR on the second, and STU VWX YZ on the third.
When enciphered, the location of the dot in each symbol (left, center, or right), would indicate which letter in that pen was represented.
More difficult systems use a non-standard form of the alphabet, such as writing it backwards in the grid, up and down in the columns, or a completely randomized set of letters.
In popular culture
The Pigpen cipher has been used in several works of popular culture including Dan Brown's 2009 novel The Lost Symbol, both in the book itself, and also to provide a puzzle in the artwork of the U.S. version of the bookjacket. The Trap, a 2009 nominee for Lancashire Children's Book of the Year, uses a variation of the Pigpen cipher.
In the computer game Assassin's Creed II, the cipher is used in the hidden glyph puzzle number 10, titled "Apollo". Here the cipher is one of many hidden messages tucked away in paintings and photos of historic events or people. Though not essential to the play of the game, the encrypted messages, some of which also use Morse Code and binary code, provide clues to the game's back-story.
The cipher is also the key to solving the third secret message found on the fictional website of Sherlock Holmes entitled "The Science of Deduction", created to accompany the BBC series Sherlock. It is presumably meant to have been left by Moriarty.
References
- Barker, Wayne G., ed (1978). The History of Codes and Ciphers in the United States Prior to World War I. Aegean Park Press. ISBN 0894120263.
- Gardner, Martin (1972). Codes, ciphers and secret writing. ISBN 0-486-24763-9.
- Kahn, David (1967). The Codebreakers. The Story of Secret Writing. Macmillan.
- Kahn, David (1996). The Codebreakers. The Story of Secret Writing. Scribner. ISBN 0684831309.
- Newton, David E. (1998). "Freemason's Cipher". Encyclopedia of Cryptology. ISBN 0-87436-772-7.
- Pratt, Fletcher (1939). Secret and Urgent: The story of codes and ciphers. Aegean Park Press. ISBN 0894122614.
- Shulman, David; Weintraub, Joseph (1961). A glossary of cryptography. Crypto Press. pp. 44.
- Wrixon, Fred B. (1998). Codes, Ciphers, and other Cryptic & Clandestine Communication. Black Dog & Leventhal Publishers, Inc.. ISBN 1579120407.
