Trifid Cipher

Fractionating cipher over a 3×3×3 cube (26 letters + '+').

Open tool

Overview

The Trifid cipher tool encrypts and decrypts text using a 3×3×3 cube — 27 cells filled with the 26 letters and one extra symbol (typically +). Each plaintext letter becomes a triple of digits (layer, row, column), the digit streams are mixed together, and the result is decoded back through the cube as ciphertext.

It is the right tool for cryptography students learning fractionating ciphers beyond Bifid, CTF players solving Trifid-themed puzzles, and historians working through Felix Delastelle's 1902 extension of his own Bifid cipher. The cube structure spreads each letter's influence across three other ciphertext letters, which historically made it harder to attack by hand.

How it works

The cube is filled with a deduplicated keyword followed by the rest of the alphabet plus + (or another agreed 27th symbol). Each plaintext letter is replaced by its (layer, row, column) coordinate, each ranging over 1–3. The message is then written as a sequence of digit triples; the tool splits the message into period-length blocks and writes the layer digits, then row digits, then column digits, in a single stream per block. The combined stream is re-read in groups of three to find new (layer, row, column) triples that are looked up in the cube to produce ciphertext.

Decryption reverses the process: convert ciphertext to triples, split the digits into three equal-length streams by period, and reassemble each plaintext letter from its (layer, row, column) triple.

Examples

Cube key:   FELIXMARIEDELASTELLE+ (deduplicated and padded out)
Plaintext:  AIDETOI    (period 5)
Output:     FMJFVOA
Plaintext:  CRYPTOGRAPHY
Cube key:   default A-Z+
Period:     5
Output:     ciphertext built by fractionating triples
Ciphertext: FMJFVOA
Same cube, period 5
Output:     AIDETOI

FAQ

Why a cube instead of a square?

A 3×3×3 cube has 27 cells, fitting 26 letters and one extra symbol. Each letter contributes three digits instead of two (as in Bifid), so the cipher spreads each letter across three ciphertext positions per period — historically a meaningful jump in by-hand cryptanalytic resistance.

What is the period?

The block length used to mix the digit streams. Shorter periods keep the cipher's spreading effect local; longer periods spread more but can leak structure if the message is long. Period 5–7 is typical.

Is Trifid secure?

No. It is a 1902 cipher; computer-aided hill-climbing solvers break it in seconds. Treat it as historical and pedagogical.

Why + instead of dropping a letter?

Filling all 27 cells means every digit triple corresponds to exactly one cube cell — no padding-to-26 awkwardness during decryption. Some implementations use # or _; the symbol does not affect security.

Try Trifid Cipher

An unhandled error has occurred. Reload ×