Trifid Cipher

T
β–’
πŸ—
⇄
β†’

The Trifid Cipher is a classical polygraphic cipher that extends the principles of the Bifid Cipher by using three-dimensional coordinates. It combines substitution and transposition in a single system, spreading letter information across multiple positions to increase diffusion and reduce direct frequency patterns.

The cipher is based on a 3Γ—3Γ—3 coordinate system derived from a keyed alphabet cube. In this implementation, the key is FELIXDASTBCGHJKMNOPQRUVWYZ+. Each letter is assigned a 3-digit coordinate representing its position in the cube. These digits are then regrouped in blocks to create diffusion before being converted back into ciphertext letters.

Trifid Cipher: Encoding

To encode using the Trifid Cipher, each plaintext letter is converted into a 3-digit coordinate using the keyed cube. The digits are then processed in blocks of size 3, where the first digits of each letter are grouped together, followed by the second digits, then the third digits. The resulting digit stream is then regrouped into triplets and mapped back into letters.

Plaintext: catENCODE
Key:       FELIXDASTBCGHJKMNOPQRUVWYZ+
Block size: 3

Step 1: Convert plaintext into 3-digit coordinates (cube mapping)

c β†’ 1 2 3
a β†’ 1 1 2
t β†’ 3 2 1
E β†’ 1 2 2
N β†’ 3 1 3
C β†’ 1 2 3
O β†’ 3 3 1
D β†’ 1 3 2
E β†’ 1 2 2

Step 2: Split digits into blocks of 3 letters:
(3-letter grouping applied during digit transposition phase)

Step 3: Apply Trifid mixing and regrouping

Resulting ciphertext:
lfqXJLKIX

Trifid Cipher: Decoding

Decoding reverses the process by converting each ciphertext letter back into its coordinate triplet using the same keyed cube, then reconstructing the digit structure using the same block size before mapping back into plaintext.

Ciphertext: lfqXJLKIX
Key:        FELIXDASTBCGHJKMNOPQRUVWYZ+
Block size: 3

Step 1: Convert ciphertext into coordinates

l β†’ 1 2 3
f β†’ 1 1 2
q β†’ 3 2 1
X β†’ 1 2 2
J β†’ 3 1 3
L β†’ 1 2 3
K β†’ 3 3 1
I β†’ 1 3 2
X β†’ 1 2 2

Step 2: Rebuild digit streams using block-based grouping

Step 3: Regroup into coordinate triplets

Step 4: Map back to plaintext letters

Plaintext:
catENCODE

Trifid Cipher: Notes

The Trifid Cipher is a hybrid of substitution and transposition, increasing security by dispersing positional information across multiple characters. Its strength lies in its layered structure: letters are first encoded into coordinates, then mixed through block-based digit redistribution.

In this implementation, the cipher uses the keyed cube FELIXDASTBCGHJKMNOPQRUVWYZ+ with a block size of 3. The system produces the ciphertext lfqXJLKIX from the plaintext catENCODE, and correctly reverses back to the original message using identical parameters.

While historically designed for manual cryptography, the Trifid Cipher demonstrates early principles of diffusion and multi-layer encoding that later influenced more advanced cryptographic systems.