Trifid Cipher Encoder Decoder – Fractionate With a 3x3x3 Cube

What the Trifid cipher is

The Trifid cipher is a classical fractionation cipher invented by the French cryptographer Felix Delastelle in 1901. It works with a cube of 3 by 3 by 3, which holds 27 characters: the 26 letters of the alphabet plus one extra symbol, usually a full stop. Every letter sits at one spot in the cube, so every letter has three coordinates: a layer, a row, and a column, each from 1 to 3.

To encrypt, you split each letter into its three coordinates, write the coordinates in three rows, read them off row by row, and group the numbers back into triples. Each triple points to a new letter in the cube. Because the coordinates are mixed across the whole block, one plain letter can turn into several different cipher letters, and that is what makes Trifid stronger than a simple substitution cipher, where each letter always turns into the same letter.

How to use the encoder

Type your message in the first box. Letters A to Z are used, and anything else, like spaces and numbers, is dropped, because the cube only holds letters and a full stop. Type a keyword if you want one: the keyword letters go first in the cube, in order, and the rest of the alphabet follows. Leave it empty to use the plain alphabet in order.

Set the period, which is the block size. The classic period is 5, and this tool uses 5 as the default. Press Encrypt to see the cipher text, or press Decrypt to turn cipher text back into the plain message. The tool also shows the first five letters as cube coordinates, so you can see the fractionation happening. Press Copy result to copy the output.

Worked example

Take the plain message ABCDE with no keyword and a period of 5. In the plain alphabet cube, A sits at layer 1, row 1, column 1; B at 1, 1, 2; C at 1, 1, 3; D at 1, 2, 1; and E at 1, 2, 2. Write the coordinates as three rows: layers 1, 1, 1, 1, 1; rows 1, 1, 1, 2, 2; columns 1, 2, 3, 1, 2.

Read the rows off in order: 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 3, 1, 2. Group them into triples: 111 is A, 111 is A, 112 is B, 212 is K, and 321 is T. So ABCDE encrypts to AABKT. Decrypting AABKT with the same period gives ABCDE back. Try HELLO with the same settings: it encrypts to BOJN with a full stop at the end, because the last triple lands on the 27th character.

Who uses the Trifid cipher

Students of cryptography use Trifid most, because it shows fractionation in a clear way: one small idea, splitting a letter into parts, changes the whole cipher. Puzzle makers use it for treasure hunts and escape rooms, where a short Trifid message is a fair puzzle that solvers can crack with a keyword and patience.

History fans use it to study how ciphers worked before computers, when soldiers and diplomats needed codes they could do by hand. It also helps anyone learning about the Bifid cipher, which does the same trick with a 5 by 5 square instead of a cube. Trifid adds one more dimension, so the mixing is stronger and the puzzle is harder.

Honest limitations

Trifid is a teaching cipher, not a secure one. A modern computer can break it quickly, and a patient person with pencil and paper can break short messages too, especially when the period is small. The 27-character alphabet also drops spaces, numbers and punctuation, so the plain message loses its shape, which can help a codebreaker.

The keyword helps, but it does not make the cipher safe. The period matters more: a period of 1 does nothing at all, because each letter maps to itself, and a period of 5 is the classic choice. Longer periods mix more, but they also make the tool slower to use by hand. Never use Trifid for a real secret; use it to learn, to play, and to make puzzles.

Frequently asked questions

Why does the same letter encrypt to different letters? Because the letter is split into three coordinates, and those coordinates are mixed with the coordinates of the letters around it. The letter that comes out depends on the whole block, not on the letter alone.

What does the period do? The period is the block size. The coordinates are mixed inside each block of that many letters, so a bigger period mixes further and makes the cipher harder to break by hand.

What happens to spaces and numbers? They are dropped, because the cube only holds 27 characters. If you need spaces, write the message without them, or mark word breaks with a full stop, which is the 27th character.

Can I decrypt without the keyword? No, not with this tool. The keyword sets the order of the cube, so a different keyword gives a different cube and a different message. Keep the keyword with the cipher text, or the message stays locked.

También disponible en español: Codificador De Cifrado Trifid – Fracciona Con Un Cubo 3x3x3

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top