Exhibit 32 of 172 18th Century

Pigpen Cipher

The Freemason cipher — symbols instead of letters, used for centuries in secret societies

Symbol frequency analysis · Pattern recognition

InventorFreemasons (popularized) · Earlier origins unknown
Year~1700s
Key TypeFixed symbol-to-letter grid
Broken BySymbol frequency analysis · Pattern recognition
Modern LessonSymbols alone do not strengthen a substitution

Why This Matters

The Pigpen cipher — used by Freemasons from at least the 18th century — is one of the most widely recognized symbol ciphers in history. It demonstrates that substituting symbols for letters provides no additional security over substituting other letters.

Historical Context

Pigpen alphabets use geometric fragments and dots as letter symbols. Kahn records a concrete Masonic example on James Leeson’s 1794 gravestone in New York. Layouts vary: an inscription needs its own alphabet convention, rather than an assumed universal Masonic key.

A secret pigpen alphabet is a monoalphabetic substitution; symbols preserve the same repetition patterns as letter substitutes. A published fixed alphabet can instead be decoded by lookup. Caesar’s restricted shift family has a much smaller keyspace than a freely permuted substitution, so the two should not be assigned identical attack difficulty.

How It Works
The grid layouts:

 A │ B │ C     J │ K │ L
───┼───┼───   ───┼───┼───
 D │ E │ F     M │ N │ O   (dotted versions)
───┼───┼───   ───┼───┼───
 G │ H │ I     P │ Q │ R

S = ╲   T = ╳   U = ╱      (X shapes)
V = ╲•  W = ╳•  X = ╱•     (dotted X)
Y = ▽   Z = △              (chevrons)

The symbol for a letter is the set of grid lines
that enclose its cell — nothing more:
A = top-left cell    → line on the right, line below
E = centre cell      → all four sides: a closed box
H = bottom-middle    → left, top and right: open below
I = bottom-right     → line above, line to the left
...etc — a dot marks the second grid (J–R)

(The demo above prints single text characters as
stand-ins, because plain text has no glyphs for
most of these shapes. The diagram below shows this exhibit’s drawn variant; its S–Z assignment differs from the common four-wedges-per-X layout.)

Documented example:
- James Leeson’s Masonic gravestone, New York, 1794
Grid 1 ABC DEF GHI Grid 2 (dotted) JKL MNO PQR S–Z STU VWX YZ Grid 1 — each glyph is the boundary of that letter's cell ABC DEF GHI Grid 2 (J–R) — the same nine shapes, each with a dot JNR A is open to the top and left; I is open to the bottom and right. Corner glyphs are never interchangeable — that is the whole key.
Pigpen cipher: A–I from the plain grid, J–R from the dotted grid, S–U from the diagonals, V–X their dotted forms, Y–Z the chevrons. Each glyph is drawn as the lines that enclose its cell, so the corner letters (A, C, G, I) each open toward a different corner of the page.
How It Was Broken
Symbol Frequency Analysis
Complexity: Trivial

A known alphabet needs only lookup. With an unknown alphabet, frequencies, repeated words and word shapes can support a substitution attack. The most frequent symbol is not necessarily E, and short inscriptions may be ambiguous. No universal minutes-to-recovery guarantee follows from using geometric symbols.

What It Teaches Modern Cryptography
Concept from Pigpen CipherModern Evolution
Symbol substitutionVisual encoding: QR codes, barcodes use symbol-to-data mapping
Fixed symbol gridCharacter encoding standards: ASCII, Unicode map characters to numbers
Secret society useNeed-to-know access control: modern cryptography enforces this mathematically
Quick Facts
Exhibit32 of 172
Era18th Century
TrustBroken
InventorFreemasons (popularized) · Earlier origins unknown
Year~1700s
Key TypeFixed symbol-to-letter grid
Broken BySymbol frequency analysis · Pattern recognition

Sources and Reading

David Kahn, The Codebreakers: The Comprehensive History of Secret Communication from Ancient Times to the Internet, revised edition (1996), Chapter 21, “Heterogeneous Impulses,” on symbol alphabets and James Leeson’s 1794 inscription. The drawn S–Z variant on this page and the four-wedge layout in the fraternal-tradition widget are explicitly different conventions.

← Previous Bacon's Cipher