Trifid Cipher
NewEncrypt and decrypt text with the Trifid cipher, Félix Delastelle's three-dimensional extension of Bifid using a 27-letter cube of coordinates.
The Trifid cipher (Félix Delastelle, 1901) extends the Bifid cipher's idea into three dimensions: every letter maps to a (layer, row, column) coordinate on a 3x3x3 cube built from a 27-letter mixed alphabet (A-Z plus "+"). Each group of letters has its layer-digits, row-digits, and column-digits concatenated into one sequence, then re-split into trigrams and converted back to letters — fractionating each letter's identity even more thoroughly than Bifid's 2D version. Non-letter characters are ignored; letters are uppercased.
Frequently Asked Questions
How is Trifid different from Bifid?
Bifid fractionates each letter into 2 coordinates (row, column) on a 5x5 grid; Trifid goes one dimension further, fractionating each letter into 3 coordinates (layer, row, column) on a 3x3x3 cube of 27 letters — the extra dimension spreads each letter's identity even more thoroughly across the ciphertext.
Why 27 letters instead of 26?
A 3x3x3 cube has exactly 27 cells, so the cipher traditionally adds a 27th symbol (conventionally a "+") alongside the 26 letters of the alphabet to fill the cube completely, following Delastelle's original design.
What does the "group size" setting do?
It splits your message into fixed-size blocks before fractionating, which was originally meant to contain hand-cipher transcription errors to a single block — the math works correctly with any group size, though Delastelle recommended sizes not divisible by 3 (like 5 or 7) for maximum mixing within each block.
Does this tool match the classic Wikipedia Trifid example?
Yes — using the exact key and 5-letter group size from Delastelle's own example, "AIDETOILECIELTAIDERA" (from the French phrase "aide-toi, le ciel t'aidera") correctly encrypts to "FMJFVOISSUFTFPUFEQQC", matching the published reference exactly.
Is Trifid harder to break than Bifid?
Generally yes — the extra dimension of fractionation makes manual cryptanalysis more laborious, though like all classical hand ciphers it's considered breakable with modern computational cryptanalysis and is included here for its historical and educational value.