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.
- Split the message into blocks of the chosen period (5 is usual).
- Under each symbol in a block, write its layer, row and column numbers in three lines.
- Read the layer line, then the row line, then the column line, as one long string of digits.
- 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
- Bifid cipher: the two-coordinate version
- Four-Square cipher: Delastelle's pair cipher
- Transposition cipher: another way to rearrange text