The Jefferson Disk Cipher, invented by Thomas Jefferson in the late 18th century, is a polyalphabetic substitution cipher that uses a set of rotating disks, each marked with a scrambled alphabet. Each disk represents a cipher alphabet, and by aligning the disks in a chosen sequence, the plaintext is encoded by selecting a row from the disks. This system effectively produces a complex, polyalphabetic cipher resistant to simple frequency analysis.

The cipher operates by placing the disks on a spindle in a predetermined order. The sender and receiver must share the same disk order and starting alignment. A key is defined as a sequence of disk numbers, which determines the order in which each letter of the message is encrypted. Only letters are substituted; spaces, numbers, and punctuation are typically left unchanged.

Jefferson Disk Cipher: Encoding

To encode a message, first choose a disk order (e.g., the 36 pre-randomized disks below). Then, for each letter of the plaintext, use the corresponding disk in the key sequence to select the ciphertext letter from that disk’s alphabet at the same position as the plaintext letter:

// Example of first 5 disks (full 36 disks used in tool)
Disk 1: B D F H J L N P R T V X Z A C E G I K M O Q S U W Y
Disk 2: A C E G I K M O Q S U W Y B D F H J L N P R T V X Z
Disk 3: Z A Y X W V U T S R Q P O N M L K J I H G F E D C B
Disk 4: Q W E R T Y U I O P A S D F G H J K L Z X C V B N M
Disk 5: M N B V C X Z L K J H G F D S A P O I U Y T R E W A

Plaintext:  H  E  L  L  O
Key (disk order): 1  2  3  4  5

Encoding each letter with its disk:
H → Disk 1 → P
E → Disk 2 → I
L → Disk 3 → P
L → Disk 4 → S
O → Disk 5 → S

Ciphertext: P I P S S

Each plaintext letter is substituted by the letter in the same position on the corresponding disk in the key sequence. Once the key sequence is exhausted, it repeats for the next letters.

Jefferson Disk Cipher: Decoding

Decoding reverses the encoding process using the same disks and key sequence. For each ciphertext letter, locate its position on the corresponding disk and substitute the plaintext letter from the standard alphabet at that position:

Ciphertext: P  I  P  S  S
Key (disk order): 1  2  3  4  5

Decoding each letter with its disk:
P → Disk 1 → H
I → Disk 2 → E
P → Disk 3 → L
S → Disk 4 → L
S → Disk 5 → O

Plaintext: H E L L O

Jefferson Disk Cipher: Notes

The Jefferson Disk Cipher provides a strong polyalphabetic substitution mechanism by using multiple rotating alphabets. Its security depends on the secrecy of the disk order and key sequence. In historical use, it foreshadowed rotor-based machines such as the Enigma Cipher, demonstrating the principle of polyalphabetic encryption with mechanical implementation. While modern cryptography has surpassed mechanical ciphers in strength, the Jefferson Disk remains an elegant example of early cipher engineering.

Jefferson Disk Cipher