The Chaocipher Clearing House

Moshe Rubin (mosher@mountainvistasoft.com)

On this page, we will demonstrate two methods for permuting and displaying Chaocipher alphabets.  We will refer to these as the "stationary zenith" and "roaming zenith" alphabet permutation methods.  Both methods are cryptographically equivalent, i.e., they encipher and decipher identically.  The main difference, as we will see, is the way the alphabets are visually presented.  Specifically, displaying the alphabets using the "roaming zenith" method gives one an excellent feeling for Chaocipher's slow alphabet diffusion effect.

The "Stationary Zenith" Method

The document that revealed the Chaocipher system, written in June 2010, was entitled "Chaocipher Revealed: The Algorithm". In that paper, the left and right alphabets were permuted and displayed using the "stationary zenith" method. (If you're a bit shaky on how Chaocipher's left and right alphabets are permuted, please read the paper). It is called the "stationary" zenith method because the zenith and nadir positions (i.e., the 1st and 14th positions) never move throughout the enciphering/deciphering process. What do move are the alphabets, which rotate and slide past the stationary zenith and nadir.  This method reflects John F. Byrne's two-wheel physical model, because at each enciphering step the alphabets rotate and shift up to the stationary zenith position.


Let's see how we permute the left and right alphabets using the "stationary zenith" method.  In this demonstration, we will use the original enciphering example taken from the paper.

Let's encipher the plaintext phrase "WELLDONEISBETTERTHANWELLSAID" using the following starting alphabets:

            *            +
LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWOBNYQ

RIGHT (pt): PTLNBQDEOYSFAVZKGJRIHWXUMC

Hovering over the above alphabets are two symbols, '*' and '+', representing the zenith and nadir positions, respectively.  In this method (i.e., "stationary zenith"), these symbols will never move, always remaining above the 1st and 14th characters of the alphabets.

The plaintext character we want to encipher is 'W'.  Looking at the alphabets above, we find the plaintext character in the 22nd position of the right (pt) alphabet.  The ciphertext equivalent will be the 22nd character in the left (ct) alphabet, in our case 'O'.

Now we permute the two alphabets, getting ready for enciphering the next plaintext letter.  Let's start with the left (ct) alphabet.

Permuting the left (ct) alphabet: "stationary zenith"

Here is the left (ct) alphabet before permuting:

            *            +
LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWOBNYQ

(1) Shift the entire left alphabet cyclically so the ciphertext letter just enciphered ('O') is positioned at the zenith (i.e., position 1):

            *            +
LEFT (ct):  OBNYQHXUCZVAMDSLKPEFJRIGTW

(2) Extract the letter found at position zenith+1 (i.e., the letter to the right of the zenith), taking it out of the alphabet, temporarily leaving an unfilled ‘hole’.

            *            +
LEFT (ct):  O-NYQHXUCZVAMDSLKPEFJRIGTW

(3) Shift all letters in positions zenith+2 up to, and including, the nadir (zenith+13), moving them one position to the left:

            *            +
LEFT (ct):  ONYQHXUCZVAMD-SLKPEFJRIGTW

(4) Lastly, insert the just-extracted letter into the nadir position (i.e., zenith+13).

            *            +
LEFT (ct):  ONYQHXUCZVAMDBSLKPEFJRIGTW

This is the new permuted left alphabet, ready for enciphering the next plaintext character.  The point to notice is that the positions of the zenith and nadir never changed, while the alphabets slid and rotated relative to them.

Permuting the right (pt) alphabet: "stationary zenith"

Here is the right (pt) alphabet before permuting:

            *            +
RIGHT (pt): PTLNBQDEOYSFAVZKGJRIHWXUMC

(1) Shift the entire right alphabet cyclically so the plaintext letter ('W') just enciphered is positioned at the zenith.

            *            +
RIGHT (pt): WXUMCPTLNBQDEOYSFAVZKGJRIH

2) Now shift the entire alphabet one more position to the left (i.e., the leftmost letter moves cyclically to the far right), moving the letter 'X' into the zenith position.
            *            +
RIGHT (pt): XUMCPTLNBQDEOYSFAVZKGJRIHW

(3) Extract the letter at position zenith+2, taking it out of the alphabet, temporarily leaving an unfilled ‘hole’.

            *            +
RIGHT (pt): XU-CPTLNBQDEOYSFAVZKGJRIHW

(4) Shift all letters beginning with zenith+3 up to, and including, the nadir (zenith+13), moving them one position to the left.

            *            +
RIGHT (pt): XUCPTLNBQDEOY-SFAVZKGJRIHW

(5) Insert the just-extracted letter into the nadir position (zenith+13).

            *            +
RIGHT (pt): XUCPTLNBQDEOYMSFAVZKGJRIHW

This is the new permuted right alphabet. As before, note how the zenith and nadir positions never changed, while the alphabets slid and rotated relative to them.

If we continued enciphering the entire plaintext phrase, we would have the following left and right alphabets (here conveniently laid out in table form):
PT -> CT     Left Alphabet (ct)           Right Alphabet (pt)

         HXUCZVAMDSLKPEFJRIGTWOBNYQ   PTLNBQDEOYSFAVZKGJRIHWXUMC
 W -> O: ONYQHXUCZVAMDBSLKPEFJRIGTW   XUCPTLNBQDEOYMSFAVZKGJRIHW
 E -> A: ADBSLKPEFJRIGMTWONYQHXUCZV   OYSFAVZKGJRIHMWXUCPTLNBQDE
 L -> H: HUCZVADBSLKPEXFJRIGMTWONYQ   NBDEOYSFAVZKGQJRIHMWXUCPTL
 L -> Q: QUCZVADBSLKPEHXFJRIGMTWONY   NBEOYSFAVZKGQDJRIHMWXUCPTL
 D -> H: HFJRIGMTWONYQXUCZVADBSLKPE   JRHMWXUCPTLNBIEOYSFAVZKGQD
 O -> C: CVADBSLKPEHFJZRIGMTWONYQXU   YSAVZKGQDJRHMFWXUCPTLNBIEO
 N -> N: NQXUCVADBSLKPYEHFJZRIGMTWO   BIOYSAVZKGQDJERHMFWXUCPTLN
 E -> Y: YHFJZRIGMTWONEQXUCVADBSLKP   RHFWXUCPTLNBIMOYSAVZKGQDJE
 I -> N: NQXUCVADBSLKPEYHFJZRIGMTWO   MOSAVZKGQDJERYHFWXUCPTLNBI
 S -> X: XCVADBSLKPEYHUFJZRIGMTWONQ   AVKGQDJERYHFWZXUCPTLNBIMOS
 B -> T: TONQXCVADBSLKWPEYHUFJZRIGM   IMSAVKGQDJERYOHFWZXUCPTLNB
 E -> S: SKWPEYHUFJZRILGMTONQXCVADB   RYHFWZXUCPTLNOBIMSAVKGQDJE
 T -> Z: ZILGMTONQXCVARDBSKWPEYHUFJ   LNBIMSAVKGQDJOERYHFWZXUCPT
 T -> J: JILGMTONQXCVAZRDBSKWPEYHUF   LNIMSAVKGQDJOBERYHFWZXUCPT
 E -> R: RBSKWPEYHUFJIDLGMTONQXCVAZ   RYFWZXUCPTLNIHMSAVKGQDJOBE
 R -> R: RSKWPEYHUFJIDBLGMTONQXCVAZ   YFZXUCPTLNIHMWSAVKGQDJOBER
 T -> H: HFJIDBLGMTONQUXCVAZRSKWPEY   LNHMWSAVKGQDJIOBERYFZXUCPT
 H -> J: JDBLGMTONQUXCIVAZRSKWPEYHF   MWAVKGQDJIOBESRYFZXUCPTLNH
 A -> B: BGMTONQUXCIVALZRSKWPEYHFJD   VKQDJIOBESRYFGZXUCPTLNHMWA
 N -> Y: YFJDBGMTONQUXHCIVALZRSKWPE   HMAVKQDJIOBESWRYFGZXUCPTLN
 W -> H: HIVALZRSKWPEYCFJDBGMTONQUX   RYGZXUCPTLNHMFAVKQDJIOBESW
 E -> Q: QXHIVALZRSKWPUEYCFJDBGMTON   SWYGZXUCPTLNHRMFAVKQDJIOBE
 L -> K: KPUEYCFJDBGMTWONQXHIVALZRS   NHMFAVKQDJIOBRESWYGZXUCPTL
 L -> S: SPUEYCFJDBGMTKWONQXHIVALZR   NHFAVKQDJIOBRMESWYGZXUCPTL
 S -> O: OQXHIVALZRSPUNEYCFJDBGMTKW   WYZXUCPTLNHFAGVKQDJIOBRMES
 A -> U: UEYCFJDBGMTKWNOQXHIVALZRSP   GVQDJIOBRMESWKYZXUCPTLNHFA
 I -> J: JBGMTKWNOQXHIDVALZRSPUEYCF   OBMESWKYZXUCPRTLNHFAGVQDJI
 D -> Y: YFJBGMTKWNOQXCHIDVALZRSPUE   JIBMESWKYZXUCOPRTLNHFAGVQD

These alphabets are, of course, perfectly correct, and show the left and right alphabets after each encipherment.  Examining successive lines of the left or right alphabets will show similar sequences, but they've been shifted and rotated so it's difficult to discern the slow diffusion and mixing of the Chaocipher alphabets as time goes on.

The "roaming zenith", discussed in the following section, will show the diffusion in a more visual fashion.

The "Roaming Zenith" Method

In this method we will permute the alphabets in the same fashion, using the same steps as the "stationary zenith" method.  The only difference is that the zenith and nadir move and roam each time we permute the alphabets.  The left alphabet will remain stationary, and the right alphabet will shift one position to the left.

Once again, we encipher the plaintext "WELLDONEISBETTERTHANWELLSAID" using the same starting alphabets:

LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWOBNYQ
RIGHT (pt): PTLNBQDEOYSFAVZKGJRIHWXUMC

You will notice that we have not yet placed the zenith and nadir symbols.  We will do so now, positioning the zenith symbol ('*') above the plaintext letter 'W', and placing the nadir symbol ('+') 13 positions to its right:

                    +            *   
LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWOBNYQ

RIGHT (pt): PTLNBQDEOYSFAVZKGJRIHWXUMC


We now permute the alphabets according to the instruction in the previous section, except for one important difference: we do not need to rotate the alphabets to bring the plaintext or ciphertext letter to the zenith - they are already at the zenith!

Permuting the left (ct) alphabet: "roaming zenith"

Here is the left (ct) alphabet before permuting:

                    +            *   
LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWOBNYQ

(1) Extract the letter found at position zenith+1 (i.e., the letter to the right of the zenith, in our case 'B'), taking it out of the alphabet, temporarily leaving an unfilled ‘hole’.

                    +            *   
LEFT (ct):  HXUCZVAMDSLKPEFJRIGTWO-NYQ

(2) Shift all letters in positions zenith+2 up to, and including, the nadir (zenith+13), moving them one position to the left:

                    +            *   
LEFT (ct):  XUCZVAMD-SLKPEFJRIGTWONYQH

(3) Lastly, insert the just-extracted letter into the nadir position (i.e., zenith+13).

                    +            *   
LEFT (ct):  XUCZVAMDBSLKPEFJRIGTWONYQH

This is the new permuted left alphabet, ready for enciphering the next plaintext character.  The point to notice is that the zenith and nadir were positioned based on the plaintext/ciphertext characters, while the alphabet did not shift at all..

Permuting the right (pt) alphabet: "roaming zenith"

Here is the right (pt) alphabet before permuting:

                    +            *   
RIGHT (pt): PTLNBQDEOYSFAVZKGJRIHWXUMC

(1) Shift the entire alphabet one position to the left (i.e., the leftmost letter moves cyclically to the far right), moving a new letter into the zenith position.

                    +            *   
RIGHT (pt): TLNBQDEOYSFAVZKGJRIHWXUMCP

(2) Extract the letter at position zenith+2 ('M'), taking it out of the alphabet, temporarily leaving an unfilled ‘hole’.

                    +            *   
RIGHT (pt): TLNBQDEOYSFAVZKGJRIHWXU-CP

(3) Shift all letters beginning with zenith+3 up to, and including, the nadir (zenith+13), moving them one position to the left.

                    +            *   
RIGHT (pt): LNBQDEOY-SFAVZKGJRIHWXUCPT

(4) Finally, insert the just-extracted letter into the nadir position (zenith+13).

                    +            *   
RIGHT (pt): LNBQDEOYMSFAVZKGJRIHWXUCPT

This is the new permuted right alphabet.  As before, note how the positions of the zenith and nadir were positioned based on the plaintext / ciphertext characters, while the alphabet shifted only one position to the left.

If we continued enciphering the entire plaintext phrase, we would have the following left and right alphabets (here conveniently laid out in table form):

PT -> CT      Left Alphabet (ct)           Right Alphabet (pt)

          HXUCZVAMDSLKPEFJRIGTWOBNYQ   PTLNBQDEOYSFAVZKGJRIHWXUMC
 W -> O:  XUCZVAMDBSLKPEFJRIGTWONYQH   LNBQDEOYMSFAVZKGJRIHWXUCPT
 E -> A:  XUCZVADBSLKPEFJRIGMTWONYQH   NBQDEOYSFAVZKGJRIHMWXUCPTL
 L -> H:  UCZVADBSLKPEXFJRIGMTWONYQH   BDEOYSFAVZKGQJRIHMWXUCPTLN
 L -> Q:  CZVADBSLKPEHXFJRIGMTWONYQU   EOYSFAVZKGQDJRIHMWXUCPTLNB
 D -> H:  CZVADBSLKPEHFJRIGMTWONYQXU   OYSFAVZKGQDJRHMWXUCPTLNBIE
 O -> C:  CVADBSLKPEHFJZRIGMTWONYQXU   YSAVZKGQDJRHMFWXUCPTLNBIEO
 N -> N:  VADBSLKPYEHFJZRIGMTWONQXUC   AVZKGQDJERHMFWXUCPTLNBIOYS
 E -> Y:  VADBSLKPYHFJZRIGMTWONEQXUC   VZKGQDJERHFWXUCPTLNBIMOYSA
 I -> N:  ADBSLKPEYHFJZRIGMTWONQXUCV   KGQDJERYHFWXUCPTLNBIMOSAVZ
 S -> X:  DBSLKPEYHUFJZRIGMTWONQXCVA   QDJERYHFWZXUCPTLNBIMOSAVKG
 B -> T:  BSLKWPEYHUFJZRIGMTONQXCVAD   JERYOHFWZXUCPTLNBIMSAVKGQD
 E -> S:  BSKWPEYHUFJZRILGMTONQXCVAD   ERYHFWZXUCPTLNOBIMSAVKGQDJ
 T -> Z:  BSKWPEYHUFJZILGMTONQXCVARD   RYHFWZXUCPTLNBIMSAVKGQDJOE
 T -> J:  BSKWPEYHUFJILGMTONQXCVAZRD   YHFWZXUCPTLNIMSAVKGQDJOBER
 E -> R:  SKWPEYHUFJIDLGMTONQXCVAZRB   FWZXUCPTLNIHMSAVKGQDJOBERY
 R -> R:  KWPEYHUFJIDBLGMTONQXCVAZRS   ZXUCPTLNIHMWSAVKGQDJOBERYF
 T -> H:  KWPEYHFJIDBLGMTONQUXCVAZRS   XUCPTLNHMWSAVKGQDJIOBERYFZ
 H -> J:  KWPEYHFJDBLGMTONQUXCIVAZRS   UCPTLNHMWAVKGQDJIOBESRYFZX
 A -> B:  KWPEYHFJDBGMTONQUXCIVALZRS   CPTLNHMWAVKQDJIOBESRYFGZXU
 N -> Y:  KWPEYFJDBGMTONQUXHCIVALZRS   PTLNHMAVKQDJIOBESWRYFGZXUC
 W -> H:  WPEYCFJDBGMTONQUXHIVALZRSK   LNHMFAVKQDJIOBESWRYGZXUCPT
 E -> Q:  PUEYCFJDBGMTONQXHIVALZRSKW   HRMFAVKQDJIOBESWYGZXUCPTLN
 L -> K:  UEYCFJDBGMTWONQXHIVALZRSKP   MFAVKQDJIOBRESWYGZXUCPTLNH
 L -> S:  EYCFJDBGMTKWONQXHIVALZRSPU   AVKQDJIOBRMESWYGZXUCPTLNHF
 S -> O:  EYCFJDBGMTKWOQXHIVALZRSPUN   VKQDJIOBRMESWYZXUCPTLNHFAG
 A -> U:  YCFJDBGMTKWNOQXHIVALZRSPUE   QDJIOBRMESWKYZXUCPTLNHFAGV
 I -> J:  YCFJBGMTKWNOQXHIDVALZRSPUE   DJIOBMESWKYZXUCPRTLNHFAGVQ
 D -> Y:  YFJBGMTKWNOQXCHIDVALZRSPUE   JIBMESWKYZXUCOPRTLNHFAGVQD


These alphabets are cryptographically equivalent to the alphabets derived using the "stationary zenith" method.  The only difference, and this is a big one (!), is that you can visually see the slow drifting and diffusion on the alphabets, one step at a time.  Two successive alphabets look extremely similar, except for one letter being transplanted elsewhere, or the alphabet shifted one place to the left.  Viewed over several steps, you get an excellent feel for the gradual entropy of the Chaocipher alphabets over time.



Copyright (c) 2020 Moshe Rubin
Created: 13 July 2020
Updated: 21 November 2020


Return to Progress Report #27