Chapter VII
We will now consider the class of substitution ciphers where a number of alphabets are used, the number and choice of alphabets depending on a key word or equivalent and being used periodically throughout the message.
In this class belong the methods of Vigenere, Porta, Beaufort, St. Cyr, and many others. These methods date back several hundred years, but variations of them are constantly appearing as new ciphers. The Larrabee cipher, used for communication between government departments, is the Vigenere cipher of the 17th Century. The cipher disk method is practically the Vigenere cipher with reversed alphabets.
In using these ciphers, there is provided a number of different cipher alphabets, usually twenty-six, and each cipher alphabet is identified by a different letter or number. A key word or phrase (or key number) is agreed upon by the correspondents. The message to be enciphered is written in lines containing a number of letters which is a multiple of the number of letters of the key. The key is written as the first line. Then each column under a letter of the key is enciphered by the cipher alphabet pertaining to that letter of the key. For example, let us take the message, “All radio messages must hereafter be put in cipher,” with the key Grant, using the Vigenere cipher alphabets given below. Each of these alphabets is identified by the first or left hand letter which represents A of the text. We thus will use in turn the alphabets beginning with G, with R, with A, with N, and with T.
| G | R | A | N | T | G | R | A | N | T |
| A | L | L | R | A | D | I | O | M | E |
| S | S | A | G | E | S | M | U | S | T |
| H | E | R | E | A | F | T | E | R | B |
| E | P | U | T | I | N | C | I | P | H |
| E | R |
Using the alphabet indicated by G, we get
| G | J |
| Y | Y |
| N | L |
| K | T |
| K |
Continuing for the other alphabets, we get
| G | C | L | E | T | J | Z | O | Z | X |
| Y | J | A | T | X | Y | D | U | F | M |
| N | V | R | R | T | L | K | E | E | U |
| K | G | U | G | B | T | T | I | C | A |
| K | I |
This method of arranging the message into lines and columns and then enciphering whole columns with each cipher alphabet is much shorter than the method of handling each letter of the message separately. The chance of error is also greatly reduced.
All these cipher methods can be operated by means of squares containing the various alphabets, cipher disks or arrangements of fixed and sliding alphabets. For example, this was the original cipher of Vigenere:
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
| B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A |
| C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B |
| D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C |
| E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D |
| F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E |
| G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F |
| H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G |
| I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H |
| J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I |
| K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J |
| L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K |
| M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L |
| N | O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M |
| O | P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N |
| P | Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
| Q | R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P |
| R | S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q |
| S | T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
| T | U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S |
| U | V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T |
| V | W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U |
| W | X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V |
| X | Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W |
| Y | Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X |
| Z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |
The first horizontal alphabet is the alphabet of the plain text. Each substitution alphabet is designated by the letter at the left of a horizontal line. For example, if the key word is BAD, the second, first and fourth alphabets are used in turn and the word WILL is enciphered XIOM.
The Larrabee cipher is merely a slightly different arrangement of the Vigenere cipher and is printed on a card in this form:
| A | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| abcdefghijklmnopqrstuvwxyz | |
| B | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| bcdefghijklmnopqrstuvwxyza | |
| C | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| cdefghijklmnopqrstuvwxyzab | |
| etc. | |
| Y | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| yzabcdefghijklmnopqrstuvwx | |
| Z | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| zabcdefghijklmnopqrstuvwxy | |
The large letters at the left are the letters of the key word. It will be noted that these letters correspond to the first letters of the cipher alphabets (in small letters) as in the Vigenere cipher.
A much simpler arrangement of the Vigenere cipher is the use of a fixed and sliding alphabet. Either the fixed or sliding alphabet must be double in order to get coincidence for every letter when A is set to the letter of the key word.
| FixedAlphabet of Text | ||
| ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
| ABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
| Movable Alphabet ofCipher | ||
As shown here, A of the fixed or text alphabet coincides with T of the movable cipher alphabet. This is the setting where T is the letter of the key word in use. The lower movable alphabet is moved for each letter of the message and the A of the fixed alphabet is made to coincide in turn with each letter of the key before the corresponding letter of the text is enciphered. It is obviously only a step from this arrangement to that of a cipher disk, where the fixed alphabet, (a single one will now serve) is printed in a circle and the movable alphabet, also in a circle, is on a separate rotatable disk. Coincidence of any letter on the disk with A of the fixed alphabet is obtained by rotating the disk.
The well known U. S. Army Cipher Disk has just such an arrangement of the fixed alphabet but the alphabet of the disk is reversed. This has several advantages in simplicity of operation but none in increasing the indecipherability of the cipher prepared with it. The arrangement of fixed and sliding alphabets which is equivalent to the U. S. Army cipher disk is this:
| FixedAlphabet | ||
| ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ | ||
| ZYXWVUTSRQPONMLKJIHGFEDCBA | ||
| Movable Alphabet | ||
It will be noticed that with this arrangement of running the alphabets in opposite directions, it becomes immaterial which alphabet is used for the text and which for the cipher for if A = G then G = A. This is not true of the Vigenere cipher.
It is perfectly feasible to substitute a card for the U. S. Army cipher disk. It would have this form:
| ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
| 1 | AZYXWVUTSRQPONMLKJIHGFEDCB |
| 2 | BAZYXWVUTSRQPONMLKJIHGFEDC |
| 3 | CBAZYXWVUTSRQPONMLKJIHGFED |
| etc. | |
| 25 | YXWVUTSRQPONMLKJIHGFEDCBAZ |
| 26 | ZYXWVUTSRQPONMLKJIHGFEDCBA |
The first horizontal line is the alphabet of the text. The other twenty-six lines are the cipher alphabets each corresponding to the letter of the key word which is at the left of the line.
One of the ciphers of Porta was prepared with a card of this kind:
| AB | ABCDEFGHIJKLM |
| NOPQRSTUVWXYZ | |
| CD | ABCDEFGHIJKLM |
| ZNOPQRSTUVWXY | |
| EF | ABCDEFGHIJKLM |
| YZABCDEFGHIJK | |
| etc. | |
| WX | ABCDEFGHIJKLM |
| PQRSTUVWXYZNO | |
| YZ | ABCDEFGHIJKLM |
| OPQRSTUVWXYZN | |
In this cipher the large letters at the left correspond to the letters of the key and, in each alphabet, the lower letter is substituted for the upper and vice versa. For example, with key BAD to encipher WILL we would get JVXY. Note that with either B or A as the key letter, the first alphabet would be used.
A combination of the Vigenere and Porta ciphers is this:
| A | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
| BC | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| BCDEFGHIJKLMNOPQRSTUVWXYZA | |
| DE | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| CDEFGHIJKLMNOPQRSTUVWXYZAB | |
| etc. | |
| VW | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| LMNOPQRSTUVWXYZABCDEFGHIJK | |
| XY | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| MNOPQRSTUVWXYZABCDEFGHIJKL | |
| Z | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| NOPQRSTUVWXYZABCDEFGHIJKLM | |
Here again the large letters at the left correspond to the letters of the key and, in each pair of alphabets, the upper one is that of the plain text and the lower is that of the cipher.
This cipher can also be operated by a fixed and sliding alphabet.
| FixedAlphabet | |||||||||||
| ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ | |||||||||||
| ABCDEFGHIJKLMNOPQRSTUVWXYZ | |||||||||||
| Sliding Alphabet of Cipher | |||||||||||
| \/ Index | |||||||||||
| |||||||||||
The other ciphers mentioned are merely variations of these that have been discussed. It is immaterial, in the following analysis, which variety has been used. The analysis is really based on what can be done with a cipher made up with a mixed cipher alphabet which may be moved with reference to the fixed alphabet of the text, (See Case 7-b). Clearly this is a much more difficult proposition than dealing with a cipher in which the cipher alphabets run in their regular sequence, either backward or forward. In fact, in the analysis of Case 7, we may consider any cipher prepared by the method of Vigenere or any of its variations as a special and simple case.
It was long ago discovered that, in any cipher of this class, (1) two like groups of letters in the cipher are most probably the result of two like groups of letters of the text enciphered by the same alphabets and (2) the number of letters in one group plus the number of letters to the beginning of the second group is a multiple of the number of alphabets used. It is evident, of course, that we may have similar groups in the cipher which are not the result of enciphering similar groups of the text by the same alphabets but if we take all recurring groups in a message and investigate the number of intervening letters, we will find that the majority of such cases will conform to these two principles.
Changing the key word and message to illustrate more clearly the above points, the following is quoted from the Signal Book, 1914, with reference to the use of the cipher disk in preparing a message with a key word.[1]
“—This simple disk can be used with a cipher word or, preferably, cipher words, known only to the correspondents.... Using the key word ‘disk’ to encipher the message ‘Artillery commander will order all guns withdrawn,’ we will proceed as follows: Write out the message to be enciphered and above it write the key word ... letter over letter, thus:
| DISK | DISK | DISK | DISK | DISK | DISK | DISK | DISK | DISK | DISK | DIS |
| ARTI | LLER | YCOM | MAND | ERWI | LLOR | DERA | LLGU | NSWI | THDR | AWN |
| DRZC | SXOT | FGEY | RIFH | ZRWC | SXET | AEBK | SXMQ | QQWC | XBPT | DMP |
“Now bring the ‘a’ of the upper disk under the first letter of the key word on the lower disk, in this case ‘D’. The first letter of the message to be enciphered is ‘A’: ‘d’ is found to be the letter connected with ‘A’, and it is put down as the first cipher letter. The letter ‘a’ is then brought under ‘I’ which is the second letter of the key word. ‘R’ is to be enciphered and ‘r’ is found to be the second cipher letter.... Proceed in this manner until the last letter of the key word is used and beginning again with the letter ‘D’, so continue until all letters of the message have been enciphered. Divided into groups of five letters, it will be as follows:
“DRZCS XOTFG EYRIF HZRWC SXETA EBKSX MQQQW CKBPT DMF.”
So much for the Signal Book; now let us examine the above message for pairs or similar groups and count the intervening letters to demonstrate principles (1) and (2);
| CSX | — | CSX | 16 | = | 4 × 4 |
| SX | — | SX | 16 | = | 4 × 4 |
| SX | — | SX | 8 | = | 2 × 4 |
| WC | — | WC | 16 | = | 4 × 4 |
The key word might contain 2, 4 or 8 letters from the evidence but we may eliminate 2 as unlikely and preparation of frequency tables of each of the four alphabets would soon show that 4 is the correct number.
A later and more extensive example (Case [7-a]) will show pairs not separated by multiples of the number of alphabets used, but the evidence in nearly every case will be practically conclusive. Especially is this so if chance assists us by giving groups of three or more letters like the group CSX in the above example. The number of alphabets having been determined each alphabet is handled by the methods of Case [6] already discussed.
Case 7-a.—The following message appeared in the “personal” column of a London paper:
“M. B. Will deposit £27 14s 5d tomorrow,”
and the next day we find this one:
M.B. CT OSB UHGI TP IPEWF H CEWIL NSTTLE FJNVX XTYLS FWKKHI BJLSI SQ VOI BKSM XMKUL SK NVPONPN GSW OL. IEAG NPSI HYJISFZ CYY NPUXQG TPRJA VXMXI AP EHVPPR TH WPPNEL. UVZUA MMYVSF KNTS ZSZ UAJPQ DLMMJXL JR RA PORTELOGJ CSULTWNI XMKUHW XGLN ELCPOWY OL. ULJTL BVJ TLBWTPZ XLD K ZISZNK OSY DL RYJUAJSSGK. TLFNS UVD VV FQGCYL FJHVSI YJL NEXV PO WTOL PYYYHSH GQBOH AGZTIQ EYFAX YPMP SQA CI XEYVXNPPAII UV TLFTWMC FU WBWXGUHIWU. AIIWG HSI YJVTI BJV XMQN SFX DQB LRTY TZ QTXLNISVZ. GIFT AII UQSJGJ OHZ XFOWFV BKAI CTWY DSWTLTTTPKFRHG IVX QCAFV TP DIIS JBF ESF JSC MCCF HNGK ESBP DJPQ NLU CTW ROSB CSM.
The messages in question appeared in an English newspaper. It is fair to presume then that the cipher is in English. This is checked negatively by the fact that it contains the letter W which is not used in any of the Latin languages and that the last fifteen words of the message consist of from two to four letters each, an impossible thing in German. It contains 108 groups which are probably words, as there are 473 letters or an average of 4.4 letters per group, while we normally expect an average of about 5 letters per group. The vowels AEIOU number 90 and the letters JKQXZ number 78. It is thus a substitution cipher (20% of 473=94.6).
Recurring words and similar groups are AIIWG, AII; BKSM, BKAI; CT, CTWY, CTW; DLMMJXL, DL; ESF, ESBP; FJNVX, FJHVSI; NPSI, NPUXQG; OSB, OSY, ROSB; OL, OL; PORTELOGJ, PO; SQ, SQA; TP, TP; TLBWTPZ, TLFNS, TLFTWMC; UVZUA, UVD, UV; XMKUL, XMKUHW; YJL, YJVTI.