Skip to main content
CipherChronicle

Cipher methods Symbols

Tic-Tac-Toe cipher

A modern variant of the Pig Pen cipher using the tic-tac-toe game grid (3×3) plus derived grids marked with circles and crosses. Each letter is encoded by the portion of grid surrounding it plus an optional marker.

Family :
Symbols
Difficulty :
Beginner
Era :
Modern variant of the Pig Pen cipher, 20th century

Also known as : Tic-Tac-Toe · Noughts and Crosses cipher · X-O cipher

The Tic-Tac-Toe cipher is a modern, playful variant of the famous Pig Pen cipher. Instead of using two 3×3 grids and two saltires, it relies on the classic tic-tac-toe grid: a simple 3×3 lattice. Each letter is represented by the slice of grid surrounding it, sometimes augmented with a circle (O) or a cross (X) to distinguish letters that would otherwise share a slot.

Principle

The alphabet is split across several 3×3 grids — typically three grids to cover the 26 Latin letters at 9 letters per grid:

Grid 1 (no marker)  :  A B C
                       D E F
                       G H I

Grid 2 (with `o`)   :   J K L
                        M N O
                        P Q R

Grid 3 (with `x`)   :   S T U
                        V W X
                        Y Z .

To encode a letter:

  1. Locate it in one of the grids.
  2. Draw the portion of grid surrounding it — i.e. the vertical and horizontal segments that form the borders of its cell.
  3. Add the marker for that grid in the centre: nothing, a dot/circle, or a cross.

The ciphertext is a stream of graphical symbols, unreadable without the reference grid.

Sample glyphs

For the cleartext CAT:

  • C lives in grid 1, position (1, 3) (top right). Draw two segments: left vertical line + bottom horizontal line. No marker.
  • A lives in grid 1, position (1, 1) (top left). Draw: right vertical line + bottom horizontal line. No marker.
  • T lives in grid 3, position (1, 2) (top centre). Draw: bottom horizontal line + left vertical line + right vertical line. Add a cross at the centre.

The ciphertext is that sequence of glyphs — each one graphically encoding the letter’s position in its grid.

Strengths and weaknesses

Strengths

  • Visually recognisable — kids pick it up in minutes; the grids look like a familiar game.
  • No equipment — paper and pencil are enough.
  • Heavy pedagogical use — a staple of children’s cryptography clubs and detective-themed escape rooms.

Weaknesses

  • No real security — the table is public and fits on a sticky note. This is a symbolic alphabet, not a cipher.
  • Variable tables — the alphabet’s arrangement across the three grids isn’t standardised. Technically the “key”, but trivial to guess by enumeration.
  • Not for long texts — each letter takes graphic space; a 50-letter message becomes a huge drawing.

Variants

  • Pig Pen / Freemasons — the historical version with two 3×3 grids and two saltires. More iconic, same principle.
  • Templar — esoteric Pig Pen variant used by the Knights Templar.
  • Rosicrucian — 17th-century mystical variant.

How to attack it by hand

The attack reduces to identifying the reference grid. Three cases:

  1. Grid attached to the message (pedagogic case) — instant decoding.
  2. Several known letters available (probable words, signatures) — recover the layout by aligning positions.
  3. No prior knowledge26! / (3! × 9 × 9 × 9) ≈ 10²³ valid permutations exist, but the canonical layout (A–I in grid 1, J–R in grid 2, S–Z in grid 3) is used in 90% of cases, so brute force is trivial in practice.

The 26 glyphs

Full table of tic-tac-toe glyphs. A dedicated space glyph is shown below.

A A A
B B B
C C C
D D D
E E E
F F F
G G G
H H H
I I I
J J J
K K K
L L L
M M M
N N N
O O O
P P P
Q Q Q
R R R
S S S
T T T
U U U
V V V
W W W
X X X
Y Y Y
Z Z Z

Space glyph

A dedicated mark for inserting a word boundary in the ciphertext.

Space