Tool to decrypt / encrypt with Delastelle's Trifide cipher using 3 grids to convert each character into a triplet (grid, line, column) before transposing the grid to find an encrypted character.
Delastelle Trifid Cipher  dCode
Tag(s) : PolyAlphabetic Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The Delastelle trifid cipher uses three 9character grids (for 27 distinct characters in total) and an integer $ N $ (usually 5 or 7).
Example: Encrypt the message SECRET, with $ N = $ 5 and grids
Grid 1  Grid 2  Grid 3  




Often, a keyword is used to generate a disordered alphabet with 27 characters (the Latin alphabet accompanied by another symbol like _ replacing any nonalphabetic character)
Step 1: For each character, search for it in grids and note are triplet of 3 corresponding digits (grid, line, column)
Example: S is in grid 3, line 1, column 1, its triplet is 311
Step 2: Write the triplets in columns, in groups of $ N $ columns next to each other and read each group in rows.
Example:
S  E  C  R  E    T 
3  1  1  2  1  3  
1  2  1  3  2  1  
1  2  3  3  2  2 
Reading group 1: 31121,12132,12332, group 2: 312
Step 3: Cut out each sequence of digits read in triplet group of 3 digits corresponding to (grid, line, column) and note the corresponding letter. These letters constitute the encrypted message.
Example: 311,211,213,212,332,312 corresponds to SJLKZT
Decryption is very similar to encryption, the difference is in step 2.
Example: Decrypt the message SJLKZT, with $ N = $ 5 and grids
Grid 1  Grid 2  Grid 3  




Step 1: identical to encryption
Step 2: Take the triplets in groups of $ N $ and write them in $ N $length lines below each other then read each group in columns.
Example: 311,211,213,212,332,312 is written
3  1  1  2  1    3  1  2 
1  2  1  3  2    
1  2  3  3  3   
Reading group 1: 311,122,113,233,123, group 2: 3,1,2
Step 3: Identical to encryption
Example: 311,122,113,233,123,312 corresponds to the plain message SECRET
The message is theoretically composed of not more than 27 distinct characters.
The $ N $ number quickly changes the encrypted message, for better encryption, it is advisable to take a value of $ N $ first with 3.
Félix Marie Delastelle described this encryption in 1902 in his book Traité Élémentaire de Cryptographie
dCode retains ownership of the "Delastelle Trifid Cipher" source code. Except explicit open source licence (indicated Creative Commons / free), the "Delastelle Trifid Cipher" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or the "Delastelle Trifid Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Delastelle Trifid Cipher" are not public, same for offline use on PC, tablet, iPhone or Android !
The copypaste of the page "Delastelle Trifid Cipher" or any of its results, is allowed as long as you cite the online source
Reminder : dCode is free to use.
Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!
Thanks to your feedback and relevant comments, dCode has developed the best 'Delastelle Trifid Cipher' tool, so feel free to write! Thank you!