Tool to decrypt/encrypt with Chaocipher, a polyalphabetic encryption algorithm using two evolving disk alphabet at each step.
Chaocipher - dCode
Tag(s) : Poly-Alphabetic Cipher
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Chaocipher encryption uses two rotating disks on which is written a custom alphabet (originally the 26 letters from A to Z using a deranged alphabet).
The two disks are identical and linked with a kind of gearing (ratio 1:1), if a disk is turned clockwise, the other turns anti-clockwise.
Example: Encrypt DCODE using the two disks:
CHAOBDEFGIJKLMNPQRSTUVWXYZ for the LEFT disk (cipher text) and
CIPHERABDFGJKLMNOQSTUVWXYZ for the RIGHT disk (plain text)
The position 1 in each disk alphabet is called zenith and the opposite position on the disk, here 14, is called nadir.
For each letter to encrypt, make these 3 steps:
First step: read the cipher letter corresponding to the plain letter (at the intersection of the two disks or at the same rank in the alphabets)
Example: The plain letter D is in front of the cipher letter G.
Second step: make a special permutation of the LEFT disk. This operation is composed of 4 actions:
1. Make a rotation of the alphabet on order to set the cipher letter at the zenith (position 1)
Example: The alphabet becomes GIJKLMNPQRSTUVWXYZCHAOBDEF
2. Extract the letter in position zenith+1 (on the right of zénith) and leave the position empty
Example: Extraction of I.
The alphabet becomes G.JKLMNPQRSTUVWXYZCHAOBDEF
3. Shift all letters from position zenith+2 until nadir (zenith+13) included by shifting them on the left
Example: The alphabet becomes GJKLMNPQRSTUV.WXYZCHAOBDEF
4. Insert the extracted letter at step 2 in the empty hole in position nadir (zenith+13)
Example: The alphabet becomes GJKLMNPQRSTUVIWXYZCHAOBDEF
Third step: make a special permutation of the RIGHT disk. This operation is composed of 4 actions:
1. Make a rotation of the alphabet in order to set the letter immediately to the right of the plain letter to the zenith (the plain letter is in position zenith-1).
Example: The alphabet becomes FGJKLMNOQSTUVWXYZCIPHERABD
2. Extract the letter in position zenith+2 and leave the position empty.
Example: Extraction of J.
The alphabet becomes FG.KLMNOQSTUVWXYZCIPHERABD
3. Shift all letters from position zenith+3 until nadir (zenith+13) included by shifting them on the left
Example: The alphabet becomes FGKLMNOQSTUVW.XYZCIPHERABD
4. Insert the extracted letter at step 3 in the empty hole in position nadir (zenith+13).
Example: The alphabet becomes FGKLMNOQSTUVWJXYZCIPHERABD
The message is obtained after these steps.
Example: Here the cipher message is GZNDZ
Decryption is identical to encryption with its 3 steps. Beware to read the plain letter on the right disk corresponding to the cipher letter on the left disk.
The ciphered message has a low index of coincidence, it is hardly distinguishable.
It is nearly impossible. However if the initial disk order has been defined using deranged alphabets, it is possible to some couples of keywords.
It is possible to change the size of the alphabet, or define new positions for permutations of the alphabets.
This ciphering was invented by John F. Byrne in 1918. He is described in his book Silent Years here (affiliate link)
dCode retains ownership of the "Chaocipher" source code. Except explicit open source licence (indicated Creative Commons / free), the "Chaocipher" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Chaocipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Chaocipher" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Chaocipher" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Chaocipher on dCode.fr [online website], retrieved on 2024-11-05,