Pigpen cipher

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

The pigpen cipher uses graphical symbols assigned according to a key similar to the above diagram.[1]

The pigpen cipher (alternately referred to as the masonic cipher, Freemason's cipher, Napoleon cipher, and tic-tac-toe cipher)[2][3] 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.


The use of symbols instead of letters 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.[4]


Cornelius Agrippa described an early form of the Rosicrucian cipher, which he attributes to an existing Kabbalistic tradition in his Three Books of Occult Philosophy, first published in 1531. This system, called "The Kabbalah of the Nine Chambers" by later authors, used the Hebrew alphabet rather than the Latin alphabet, and was used for creating sigils of spirits rather than for any apparent cryptological purpose.[5] Variations of this cipher were used by both the Rosicrucian brotherhood[6] and the Freemasons, though the latter used the pigpen cipher so often that the system is frequently called the Freemason's cipher. They began using it in the early 18th century to keep their records of history and rites private, and for correspondence between lodge leaders.[3][7][8] Tombstones of Freemasons can also be found which use the system as part of the engravings. One of the earliest stones in Trinity Church Cemetery in New York City, which opened in 1697, contains a cipher of this type which deciphers to "Remember death" (cf. "memento mori"). George Washington's army had documentation about the system, with a much more randomized form of the alphabet. And during the American Civil War, the system was used by Union prisoners in Confederate prisons.[6]


Using the Pigpen cipher key below, the message "X MARKS THE SPOT" is rendered in ciphertext as:

An example pigpen message


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: grid, grid, X, X. Another commonly used system orders the symbols as grid, X, grid, X. Another is grid, grid, grid, with each cell having a letter of the alphabet, and the last one having an "&" character. Letters from the first grid 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.[9]

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.[2][6] When enciphered, the location of the dot in each symbol (left, center, or right), would indicate which letter in that pen was represented.[1][6] 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,[4] or a completely randomized set of letters.

The Templar cipher is a method claimed to have been used by the Knights Templar. It uses a variant of a Maltese Cross.[10] Alphabet templier.svg


  1. ^ a b Wrixon, pp. 182–183
  2. ^ a b Barker, p. 40
  3. ^ a b Wrixon, p. 27
  4. ^ a b Gardner
  5. ^ Agrippa, Cornelius. "Three Books of Occult Philosophy", http://www.esotericarchives.com/agrippa/agripp3c.htm#chap30
  6. ^ a b c d Pratt, pp. 142–143
  7. ^ Kahn, 1967, p.~772
  8. ^ Newton, 1998, p. 113
  9. ^ Glossary of Cryptography
  10. ^ McKeown, Trevor W. "Purported Templars cipher". freemasonry.bcy.ca. Retrieved 2016-11-07.


External links[edit]