Introduction
Commandant Etienne Bazeries designed his cylindrical cipher in 1898, a century after Thomas Jefferson sketched a similar wheel cipher. The Bazeries cylinder uses 20 rotating disks, each stamped with a 25-letter scrambled alphabet (the letter W is omitted, as it was not used in French telegraphy). Bazeries published the disk alphabets in his 1901 book "Les chiffres secrets devoiles." This tool reproduces all 20 historical alphabets so you can encrypt and decrypt exactly as a French signals officer would have. Set the disk order, type your message, and read the ciphertext from any row. Everything runs in your browser.
What this tool does
- Encrypts plaintext using 20 rotating disks, each carrying a 25-letter scrambled alphabet transcribed from Bazeries's 1901 book (no W, matching French telegraphy conventions).
- Decrypts by aligning ciphertext on the reference row and reading plaintext from the inverse row offset.
- Lets you set the disk order (the key) manually, shuffle it randomly, or keep the default sequential arrangement of disks 1 through 20.
- Displays the full 25-row disk grid so you can see the plaintext row and the chosen ciphertext row highlighted side by side.
- In decode mode, shows all 24 candidate plaintext rows sorted by language score, so you can pick the correct reading when the offset is unknown.
- Processes all data locally. No plaintext or ciphertext leaves your browser.
How this tool works
The tool loads the 20 Bazeries disk alphabets and arranges them in your chosen order. In encode mode, each 20-character block is aligned across row 0 of the disk grid. The ciphertext is read from the row at your chosen offset (default 1). Non-alphabetic characters pass through unchanged. In decode mode, the tool aligns ciphertext on row 0 and reads plaintext from the inverse offset.
The grid display shows all 25 rows for the first block. The plaintext row is blue, the ciphertext row green. If you do not know the offset, enable "Show all rows" in decode mode. The tool generates all 24 candidate plaintexts sorted by language frequency score, with the most likely reading at top. The shuffle button randomizes the disk order. The current order is encoded in the URL, so you can share a link that reproduces your exact configuration.
The tool also lets you display the raw 20 disk alphabets. Disk 1 is the normal A-Z order (minus W). Disk 2 places consonants first, then vowels. Disks 7 through 20 are derived from French key phrases such as "Allons enfants de la patrie" and "Dieu protege la France."
How the Bazeries cylinder works
Etienne Bazeries (1846-1931) was a French military cryptographer who broke numerous cipher systems during his career at the Bureau du Chiffre. He designed his cylinder cipher in 1898 and described it in detail in Les chiffres secrets devoiles (1901, pages 204-205). The device is a direct descendant of Thomas Jefferson's wheel cipher, which Jefferson sketched around 1795. Jefferson's design used 36 disks, while Bazeries reduced this to 20 and used a 25-letter French alphabet that omits W.
Each disk carries a different scrambled alphabet around its rim. The key is the order in which the 20 disks are placed on the central axle. To encrypt, the operator rotates each disk until the plaintext letters form a horizontal row, then reads any other row as ciphertext. Decryption reverses the process: arrange the disks in the agreed order, rotate to spell the ciphertext, and scan the other 24 rows for the one that reads as sensible text.
The key space is 20! (approximately 2.43 x 10^18, or about 61 bits). This is smaller than the M-94's 25! key space (about 84 bits), but the Bazeries cylinder predates the M-94 by over two decades. The cipher is a polyalphabetic substitution: each column position uses a different disk alphabet, so simple frequency analysis on a single message does not work. However, if an analyst obtains multiple messages with the same disk order, they can superimpose them and attack each column independently. For a comparison with the American variant, see the M-94 Cipher tool. The Jefferson Disk tool shows the original 1795 design that started this family of ciphers.
How to use this tool
- Choose a mode: Encode to encrypt plaintext, or Decode to recover plaintext from ciphertext.
- Set the disk order. Use Shuffle to randomize the 20 disks into a new key, or keep the default 1-20 sequential order.
- Set the row offset (1-24). This determines which row the ciphertext is read from during encryption. The default is 1.
- Type or paste your text. The output updates instantly. In encode mode, the ciphertext appears in the output field.
- To decrypt, switch to Decode mode and use the same disk order and row offset. If you do not know the offset, enable Show all rows and pick the reading that makes sense.
- Use the disk grid display to see how the plaintext row maps to the ciphertext row across all 20 disk columns.
Real-world examples
Encrypting a French military message
A reenactor sets the disk order to a random permutation of 1-20 and types "RENDEZVOUS A MINUIT" (replace W with VV, as the Bazeries alphabet omits W). The tool aligns each 20-character block across the plaintext row and reads the ciphertext from row 7. The output is a block of seemingly random letters. The recipient must know the same disk order and the row offset (7) to recover the message.
Decrypting when the offset is unknown
A student receives ciphertext encrypted with the Bazeries cylinder but does not know which row offset was used. They paste the ciphertext, switch to Decode mode, and enable Show all rows. The tool generates all 24 candidate plaintexts and sorts them by language frequency score. The top result reads as coherent French, revealing both the plaintext and the offset that was used.
Comparing the Bazeries and Jefferson designs
A cryptography class encrypts the same message with both the Bazeries cylinder (20 disks, 25 letters) and the Jefferson Disk (25 disks, 26 letters). The Bazeries output is shorter per block (20 characters vs 25) and uses no W. Students observe that both ciphers share the same mechanical principle: scrambled-alphabet disks on an axle, with the disk order as the key.
Demonstrating the multiple-anagram weakness
A class encrypts five 20-character messages with the same disk order. By stacking the ciphertexts vertically, each column contains letters scrambled by the same disk. Students anagram each column independently to recover the disk order, showing why the Bazeries cylinder required frequent key changes in practice.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| Bazeries cylinder (1898) | O(n) with 20! key space (~61 bits) | French military cipher, late 19th century |
| Jefferson disk (1795) | O(n) with 36! key space (~138 bits) | U.S. diplomatic correspondence, early 19th century |
| M-94 / CSP-488 (1922) | O(n) with 25! key space (~84 bits) | U.S. Army tactical cipher 1922-1943 |
| Alberti cipher disk (1467) | O(n) with single rotating disk | Renaissance diplomatic cipher |
| Vigenere cipher | O(n) with keyword length k | 19th century polyalphabetic substitution |
Limitations or considerations
The Bazeries cylinder is insecure by modern standards. Its key space of 20! (about 61 bits) is smaller than the M-94's 84 bits, and the cipher falls to multiple-anagram attacks when an analyst obtains several messages with the same key. The cipher also requires both parties to share the same physical disk set and daily disk order, creating a key distribution problem.
This tool uses the historical Bazeries alphabets, which are public. The 25-letter alphabet omits W, so any W in your input will not be encrypted correctly. Replace W with VV before encrypting for historical accuracy. Non-alphabetic characters pass through unchanged, which leaks word boundaries and punctuation. For actual encryption, use AES-256 via the Block Cipher tool.
Frequently asked questions
What is the difference between the Bazeries cylinder and the Jefferson disk?
Jefferson designed his wheel cipher around 1795 with 36 disks and a 26-letter alphabet. Bazeries designed his cylinder in 1898 with 20 disks and a 25-letter French alphabet (no W). The mechanism is identical: scrambled-alphabet disks on an axle, with the disk order as the key. Bazeries arrived at the design independently, as Jefferson's cipher was not widely known at the time.
Why does the Bazeries alphabet omit the letter W?
French telegraphy in the late 19th century did not use the letter W. Bazeries designed his 25-letter alphabet accordingly, using only A through Z minus W. If your plaintext contains W, replace it with VV before encrypting for historical accuracy.
How large is the Bazeries cylinder key space?
The key is the order of 20 disks on the axle, giving 20! possible arrangements. That is approximately 2.43 x 10^18, or about 61 bits of key material. This was adequate for late 19th century field use, but the cipher is vulnerable to multiple-anagram attacks when several messages share the same key.
Where do the 20 disk alphabets come from?
Bazeries published all 20 alphabets in his 1901 book Les chiffres secrets devoiles (pages 204-205). The first six disks use systematic arrangements (normal order, consonants-then-vowels, reversed, and so on). Disks 7 through 20 are derived from French key phrases such as "Allons enfants de la patrie" and "Dieu protege la France." A transcription is available at bribes.org.
Was the Bazeries cylinder ever used in practice?
Bazeries proposed the cylinder to the French military, but it was not widely adopted as a standard field cipher. His greater contribution was as a cryptanalyst: he broke the Great French Cipher (the French diplomatic code) in 1898, recovering messages dating back to the reign of Louis XIV. The cylinder design influenced later devices like the U.S. M-94.
Conclusion
This tool reproduces the Bazeries cylinder with all 20 historical disk alphabets from the 1901 publication. The visual grid shows how each disk column scrambles the plaintext independently, and the all-rows decode mode mirrors the recipient's original workflow of scanning for the readable row. The Bazeries cylinder is a good teaching example for polyalphabetic substitution and the Jefferson disk family. For the American variant with 25 disks, see the M-94 Cipher tool. For the original 1795 design, try the Jefferson Disk tool. For an earlier single-disk cipher, see the Alberti Cipher Disk.