Trifid
Delastelle's cipher in three dimensions, with fragments of three letters inside every output character.
What is loaded
The cube key is Delastelle’s own name. FELIX MARIE DELASTELLE with its repeats struck out gives FELIXMARDST, and the letters it did not use follow in alphabetical order. The message is the French proverb aide-toi, le ciel t’aidera: help yourself and heaven will help you. At a period of 5 it enciphers to FMJFVOISSUFTFPUFEQQC, printed in the usual fives as FMJFV OISSU FTFPU FEQQC.
Delastelle finished the Traité élémentaire de cryptographie in May 1901 and died in April 1902. Gauthier-Villars brought the book out in Paris three months after that, and Trifid is in it.
The cube
Twenty-seven cells, stacked as three layers of three by three. Every character becomes three digits: layer, row, column. Twenty-seven is one more than the alphabet needs, so no two letters have to share a cell, and the spare goes to a plus sign standing in for a space. That plus sign is a real character here. Type one and it enciphers like a letter, while a typed space is dropped along with everything else the cube cannot hold.
How the digits move
Inside each block Trifid reads off every layer digit, then every row digit, then every column digit, and cuts the result into threes. Each three is a new position in the cube.
Follow the first letter of the loaded message. A sits at layer 1, row 3, column 1. Its layer digit lands in the first ciphertext letter, its row digit in the second and its column digit in the fourth, and each of those letters is carrying digits belonging to other letters as well. One input character spreads across three output characters, and every output character is a blend of three inputs.
The period sets the block size, as it does in Bifid, and 0 makes the whole message a single block.
What it costs
Three lines to write out per block, and a miscount anywhere destroys the block. The return is an output whose letter frequencies tell an attacker almost nothing.
Breaking it is Bifid’s attack with more arithmetic in it. Guess the period, which is small, then hill-climb the twenty-seven cells against a few hundred letters. The extra dimension buys diffusion rather than key space, and a cube filled from a name someone can remember is a short search.
Related
Bifid is the two-dimensional original and the easier place to start. The Polybius square does the same lookup on a flat grid and stops there.