CacheHackCacheHack

Trifid Cipher

Encode and decode using the Trifid cipher. A 3D fractionating cipher invented by Felix Delastelle.

Used to generate the 3x3x3 cube
Group size for fractionation

Trifid Cube (3 layers)

How Trifid Works

  1. Each letter has 3D coordinates (layer, row, column)
  2. Split message into groups of period length
  3. Write all layers, then rows, then columns
  4. Read in groups of 3 to get new coordinates

What is the Trifid Cipher?

The Trifid cipher is a classical cipher invented by Felix Delastelle around 1902. It extends the Bifid cipher's concept into three dimensions, using a 3×3×3 cube instead of a 5×5 square, allowing it to encode 27 symbols (A-Z plus one extra).

How It Works

The Cube

The 27-character alphabet is arranged in a 3×3×3 cube. Each letter has three coordinates: layer (0-2), row (0-2), and column (0-2).

Encryption Process

  1. Divide the plaintext into groups of the period length
  2. Convert each letter to its three coordinates
  3. Write all layer values, then rows, then columns
  4. Read the combined digits in groups of 3 as new coordinates
  5. Convert back to letters

The Period

The period determines how letters are grouped for fractionation:

  • Small period (3-5): More diffusion per letter
  • Large period: Affects more letters at once
  • Period = message length: Maximum diffusion

Trifid in Geocaching

The Trifid cipher appears in puzzles because:

  • Advanced cipher: More challenging than basic substitutions
  • 3D aspect: Interesting visual element
  • Historical: Part of classical cryptography
  • Two parameters: Both keyword and period can be puzzle clues

Breaking the Cipher

Without the keyword and period:

  • Period determination: Try common periods (5, 7, etc.)
  • Hill climbing: Optimize the cube arrangement
  • Known plaintext: Greatly simplifies the attack
  • Dictionary attack: Try common keywords