Free Tool

Trifid Cipher Tool

27 symbols in a cube, three coordinates each

Ciphertext

How the Trifid cipher works

Trifid uses 27 symbols: the letters A to Z and +. The keyword's letters come first, each once, then the rest in alphabetical order, then +. They fill a cube of three 3×3 layers, so every symbol has three numbers: its layer, row and column, each from 1 to 3.

  1. Split the message into blocks of the chosen period (5 is usual).
  2. Under each symbol in a block, write its layer, row and column numbers in three lines.
  3. Read the layer line, then the row line, then the column line, as one long string of digits.
  4. Take the digits three at a time. Each group is a layer, row and column: look it up in the cube.

To decrypt, write out every cipher symbol's three digits in order, split the line into three equal parts (layers, rows, columns), and read each plain symbol straight down.

Example

Delastelle's own example uses the key FELIX MARIE DELASTELLE, which gives the order FELIXMARDSTBCGHJKNOPQUVWYZ+. With period 5, the French phrase AIDE-TOI, LE CIEL T'AIDERA ("heaven helps those who help themselves") encrypts to FMJFV OISSU FTFPU FEQQC.

How to break it

  • Find the period. As with Bifid, cipher letters inside one block share digits with neighbouring plain letters, so statistics at a fixed spacing reveal the period.
  • Known plaintext. A guessed word gives digit-by-digit equations that place symbols in the cube.
  • Computer search. With the period known, hill climbing over cube orders breaks a few hundred letters.

History

Trifid is Félix Delastelle's three-dimensional follow-up to Bifid, described in his 1902 book. It was one of the first ciphers to mix each letter's coordinates with its neighbours', an idea modern block ciphers still rely on.

Related tools

Questions

What is the + sign in the Trifid cipher?

A 3×3×3 cube has 27 cells and the alphabet has 26 letters, so one extra symbol fills the last cell. This tool uses +, the symbol in Delastelle's own example. It can stand for a space or a full stop.

Why should the period not be a multiple of 3?

With a period of 3, 6, 9 and so on, the digits line up so that some cipher letters come from a single plain letter, which leaks information. Periods like 5, 7 or 8 mix every letter with its neighbours.

How is Trifid different from Bifid?

Bifid gives each letter two coordinates in a 5×5 square. Trifid gives each symbol three coordinates in a 3×3×3 cube, so each cipher letter depends on up to three plain letters, and I and J don't need to share a cell.