1001Ferramentas
🔺Security

Trifid Cipher

Encodes each letter of a message as its three coordinates in the 3x3x3 Delastelle grid, the fractionation step that the Trifid cipher is built on.

Triplas

Three layers of three by three

Felix Delastelle published the Trifid early in the 20th century as the three dimensional sibling of his Bifid, and it shows up regularly in classical cipher collections and CTF puzzles. Most people arrive here wanting to see the triplets: each letter becomes three digits from 1 to 3, something like 132 122 213 213 223, and the question is where exactly those numbers come from.

There are 27 slots arranged as three 3x3 layers, because 3 cubed is 27, which fits the 26 letters plus one spare character, here a full stop. A letter's position becomes layer, row and column, each from 1 to 3. H sits in the eighth slot, giving layer 1, row 3, column 2, which reads as 132. HELLO comes out as 132 122 213 213 223. The alphabet is in plain order with no keyword scrambling it, and the filter drops anything that is not a letter, so the full stop never actually appears.

This page gives you the coordinate encoding, which is the first half of the Trifid. In the full cipher you write the three coordinates on three lines, cut the block by a chosen period, read row by row inside each block and convert back to letters; that fractionation is what makes each output letter depend on three input letters. Without it you have plain substitution. Good for study and puzzles, not for security. Everything runs in your browser.

Frequently asked questions

Why 27 slots and not 26?
Because the cube is 3x3x3, which gives 27 cells. One is left over and is usually filled with a full stop or a plus sign that acts as a word separator.
Is this output the complete Trifid?
No. The period based fractionation is missing, and that is the step that shuffles coordinates before converting back. Without it, each plaintext letter always yields the same triplet.
How do I read a triplet like 132?
First digit is the layer, second is the row, third is the column. Layer 1, row 3, column 2 points at H in the plain ordered alphabet.

Related Tools