CHAPTER XX Vigenère with Key-Progression
Before leaving the study of multiple-alphabet ciphers, we will consider briefly the process which, in its simplest form, would be that shown in Fig. 154. The initial key, in each of three examples, is A, and a long key has been formed by causing the initial one to progress in the normal alphabet according to an agreed index. In the first example, the progression index is 1, in the second, it is 2, and in the third, it is 25 (or minus 1). The resulting long key will govern a period, which is 26 or 13, according to whether the progression index is odd or even. This encipherment, logically, would be applied with a cipher disk. The initial key, as A of the examples, would indicate the starting position of the revolving disk, the first letter being enciphered with the disk in this initial position, after which the disk is made to revolve, so many angles at a time, without further reference to key-letters. For this kind of cryptogram, the solution is purely mechanical. A series of alphabets may be extended, with each cryptogram letter as a beginning, and the message can be found following a diagonal path in the resulting set-up.
Figure 154
Forms of Key-Progression
Keys: A B C D E F G... A C E G I K M... A Z Y X W V U... S E N D... S E N D... S E N D... S F P G... S G R J... S D L A...
This type of key-progression can be decrypted by "running down the alphabet," and watching the diagonals for plaintext.
A much commoner scheme, when using a cipher disk, is that of following a series of irregular shifts in accordance with a numerical key. If, for instance, the initial position has been established and the first letter enciphered in that position, and if the numerical key is 3-5-2-1-6, the disk will now be revolved 3 positions for encipherment of the second letter, 5 positions for encipherment of the third letter, 2 positions for encipherment of the fourth letter, and so on, so that the disk must move 17 positions during encipherment of five letters. This can produce a very long period indeed, especially when the collective shifts result in an odd number.
Figure 155
Progressing Key: C U L P E P E R D V M Q F Q F S E W N R ... Plaintext: T H E R E I S O T H E R C A U S E F O R ... Partial Encipherment: V B P G . . . . W C Q H . . . . . . . I ...
Substantially the same encipherment as the foregoing can be had with a slide and a key-word, as indicated in Fig. 155. The progression index, in this figure, is 1. The preliminary key-word, CULPEPER, enciphers the first eight letters, then moves forward in the alphabet and becomes D V M Q F Q F S for the encipherment of the next eight, E W N R G R G T for the encipherment of the third eight, and so on. In its practical application, one column could be taken at a time. Notice, however, in Fig. 156, that when a key-letter progresses in the alphabet, the possible substitutes for any one letter will also progress, and to exactly the same extent. If the encipherment is Vigenère or Beaufort proper, this progression is in the same alphabetical direction as that of key-letters, while the variant encipherment causes the substitutes to progress in the contrary direction. Probably, then, the most convenient method of application, and the one least likely to result in errors, would be that of Fig. 157. The cryptogram is first enciphered as an ordinary periodic, and the progression is added later, using group-by-group encipherment. Thus, as we receive the cryptogram, our repeated ther has been enciphered once as V B P G, again as W C Q H, and possibly, later on, as A G U L, and the only period we shall be able to find, using the regular methods, will be 26 x 8, or, if the progression index is an even number, 13 x 8. But notice, in the same figure, comparisons (a) and (b).
Figure 156
Vigenère and Beaufort Progression Variant Progression
Progressing Key: A B C D E..... Progressing Key: A B C D E..... Plaintext letter: H H H H H..... Plaintext Letter: H H H H H.....
Cipher letter (V) H I J K L..... Cipher letter: H G F E D..... (B) T U V W X.....
Vigenère, it will be remembered, has been compared to the mathematical process of addition. If the key-digram CU be added to the plaintext digram TH, their sum is the cipher-digram VB. The alphabetical distance from C to U is 18, the alphabetical distance TH is 14, and the alphabetical distance VB is 6 or could be 26 plus 6, 52 plus 6, and so on. It is a fact that when we “add” the two digrams CU and TH, we actually do add their separating intervals, 18 and 14, since we obtain a sum 32 in that of the cipher digram VB. It is also an easily verified fact that the same reasoning applies to the subtractions of the two Beauforts. The student who cares to investigate may make use of the tableau shown as Fig. 158; to find quickly the distance from one letter to another, find the first of these at the left, the second at the top, and the alphabetical interval between the two is shown in the cell of intersection. If it is desired to know the reverse interval, find the first letter at the top and the second at the side. Now notice, carefully, that when any digram progresses in the alphabet, as CU would become DV, EW, FX, and so on, in a series of periods, it does not change its alphabetical interval; in all of these digrams, the distance apart of the two component letters is still 18. Thus, while our period vanishes, the alphabetical intervals which represent it are still present in the cryptogram; we have only to find these intervals, subject them to a Kasiski examination, and convert the cryptogram to an ordinary Vigenère.
Figure 157
Initial Key-word: C U L P E P E R C U L P E P E R C U L P E P E R Plaintext: T H E R E I S O T H E R C A U S E F O R T H I N... PRIMARY Cryptogram: V B P G I X W F V B P G G P Y J G Z Z G X W M E...
Progression Key: A B C FINAL Cryptogram: V B P G I X W F W C Q H H Q Z K I B B I Z Y N G...
(a) C U (key) plus T H (plaintext) equals V B (cipher). (b) Interval 18 plus interval 14 equals (32 less 26) = 6
Figure 158
Tableau for Finding ALPHABETICAL INTERVALS
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
A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 A B 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 B C 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 C D 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 D E 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 E F 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 F G 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 G H 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 H I 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 I J 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 J K 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 K L 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 L M 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 13 M N 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 12 N O 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 11 O P 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 10 P Q 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 9 Q R 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 8 R S 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 7 S T 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 6 T U 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 5 U V 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 4 V W 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 3 W X 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 2 X Y 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 1 Y Z 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 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 Z
Fig. 159 shows the preparation of the cryptogram: The alphabetical interval from K to O is 4, that from O to S is 4, that from S to X is 5, and so on. If these numbers are placed directly below the first letter, as shown, the computation of their lineal intervals apart is less confusing than when they are placed between the two. As to repetitions, each repeated single number may represent a repeated digram, each repeated sequence of two numbers may represent a repeated trigram, and so on. Only the longer of these possibilities have been underscored.
Figure 159
(5) (10) (15) (20) K O S X M Y M M Q Y T K N G Z W L T Z L 4 4 5 15 12 14 0 4 8 21 17 3 19 19 23 15 8 6 12 22
(25) (30) (35) (40) H C G F A P J Y K W A T Z P Q X U J Z P 21 4 25 21 15 20 15 12 12 4 19 6 16 1 7 23 15 16 16 6
(45) (50) (55) (60) V C Z Q A R F P V Y U Y C R C X M X G I 7 23 17 10 17 14 10 6 3 22 4 4 15 11 21 15 11 9 2 21
(65) (70) (75) (80) D U X Q Y M T E V V S C X J L J D A E Y 17 3 19 8 14 7 11 17 0 23 10 21 12 2 24 20 23 4 20 4
(85) (90) (95) (100) C S F P J W F V J V Q V E G A N G K B B 16 13 10 20 13 9 16 14 12 21 5 9 2 20 13 19 4 17 0 17
(105) (110) (115) (120) S C P Z B H G I D Z J A N Z I Y E Z P T 10 13 10 2 6 25 2 21 22 10 17 13 12 9 16 6 21 16 4 -
Figure 160
Repeated Intervals Lineal Interval Possible Factors
4-4 KOS-UYC 51 - 1 = 50 2 5 10 15-12 XMY-JYK 27 - 4 = 23 21-17-3-19 YTKNG-IDUXQ 60 - 10 = 50 2 5 10 23-15 ZWL-XUJ 36 - 15 = 21 3 7 21-15 FAP-CXM 55 - 24 = 31 7-23 QXU-VCZ 41 - 35 = 6 2 3 6 16-6 ZPV-IYE 115 - 39 = 76 2 4 19 17-10 ZQA-BSC 100 - 43 = 57 3 19 10-17 QAR-ZJA 110 - 44 = 66 2 3 6 11 15-11 CRC-XMX 56 - 53 = 3 3 9-2 XGI-VEG 92 - 58 = 34 2 17 2-21 GID-GID 107 - 59 = 48 2 3 4 6 8 12 17-0 EVV-KBB 98 - 68 = 30 2 3 5 6 10 13-10 SFP-CPZ 102 - 82 = 20 2 4 5 10 20-13 PJW-GAN 94 - 84 = 10 2 5 10 9-16 WFV-ZIY 114 - 86 = 28 2 4 7
Fig. 160 shows the application of a modified Kasiski examination. Notice the prominence of small factors 2 and 3, caused, often, by repeated alphabetical intervals in the key itself. In the given case, the period 10 would probably be the choice, though period 5 is correct; in practice, we should probably consider possible digrams as well as longer sequences. Accepting period 10, we have still to learn the progression index, and for this we must consider letters, all of which are shown in the second column of the same figure. Taking the longest repetition, most likely to be reliable, the two first letters are Y and I; their alphabetical distance apart is 10, and their lineal distance apart in the cryptogram is 50. If the accepted period, 10, is correct, it has taken five periods to produce the alphabetical shift of 10, therefore the shift per period (the progression index) is 10 divided by 5; or 2. This, of course, has taken for granted that the encipherment is either Vigenère or Beaufort. Considered as a possible variant Beaufort, where the progression is backward, the alphabetical interval from Y to I is 16, which is not divisible by 5, the number of periods. But this progression might have covered the entire alphabet and then included 16, or it might have covered the alphabet twice, and so on, before including 16. We must make it divisible by 5, adding 26, then another 26, and so on, until we obtain a total progression of 120. This, divided by 5, gives the progression index as “minus 24” — the same as a normal progression of 2. In Fig. 161, the cryptogram has been re-written into the accepted period 10, and the figures in parentheses at the right of each group will indicate the amount of alphabetical shift when the progression index is 2. A constant progression of 2 per group would correspond to the application of a Vigenère key A C E G. . . . . , so that the Saint-Cyr slide will serve for quickly converting the cryptogram to its periodic form, and this is shown in Fig. 162. The period, as mentioned, is actually 5, though this makes no difference in the final results.
Figure 161 Figure 162
K4 O4 S5 X15M12Y14M0 M4 Q8 Y21 (A) K O S X M Y M M Q Y
T17K3 N19G19Z23W15L8 T6 Z12L22 (2) (C) R I L E X U J R X J
H21C4 G25F21A15P20J15Y12K12W4 (4) (E) D Y C B W L F U G S
A19T6 Z16P1 Q7 X23U15J16Z16P6 (6) (G) U N T J K R O D T J
V7 C23Z17Q10A17R14F10P6 V3 Y22 (8) (I) N U R I S J X H N Q
U4 Y4 C15R11C21X15M11X9 G2 I21 (10) (K) K O S H S N C N W Y
D17U3 X19Q8 Y14M7 T11E17V0 V23 (12) (M) R I L E M A H S J J
S10C21X12J2 L24J20D23A4 E20Y4 (14) (O) E O J V X V P M Q K
C16S13F10P20J13W9 F16V14J12V21 (16) (Q) M C P Z T G P F T F
Q5 V9 E2 G20A13N19G4 K17B0 B17 (18) (S) Y D M O I V O S J J
S10C13P10Z2 B6 H25G2 I21D22Z10 (20) (U) Y I V F H N M O J F
J17A13N12Z9 I16Y6 E21Z16P4 T- (22) (W) N E R D M C I D T X
Figure 163
Mathematical Formula - C. H. Price
X = AD x P LD P = Period AD = Alphabetical Distance X = Progression Index LD = Lineal Distance
As Applied to the Supposed Repeated Trigram KOS-UYC, Positions 1, 51:
X = 10 P = P 50 5
BUT: P and X must be integers • • If P = 5, then X = 1 (and P must be a divisor of 50) • If P = 10, then X = 2 (Periods of 25, 50, are unlikely)
For those who like mathematics, Fig. 163 shows a method used by one of our collaborators for determining both the period and the progression index directly from the cryptogram. Price also preferred to find alphabetical intervals by writing the normal alphabet into a block, five letters to the line, with Z standing alone on the last line; thus, except for watching Z occasionally, the distance from one letter to another could be counted by fives. It is understood, of course, that we do not accept the evidence obtained from only one of the supposed repeated sequences; too many of these will be accidental, and many of those which are actually periodic have not represented repeated digrams, but merely repeated intervals. Naturally, too, the progression index need not be a small number; the disk encipherment, mentioned in the beginning, showed a progression of 17 for each period 5. This disk encipherment, incidentally, has been dealt with in a most interesting manner in Givierge’s Cours de cryptographie.
* * *
We have seen, then, all of the essentials of polyalphabetical encipherment. With the cipher alphabets known to the decryptor, practically all of the multiple-alphabet ciphers will be solved by suitable modifications of processes described for Vigenère. When alphabets are not known, his problem, always, is that of collecting as many as possible of the substitutes belonging to each alphabet, so that he may determine both the order of the letters and the relationship of alphabets to one another.
144. By THE SQUIRE.
S O V F O G S G U F V I J R I F M O U I C F T T I K Z Y Z Z Z U I F Q Q L O W U V A F J F I W W L N C R G J F E M V V N N C D H W T A J N W A R D B. yallyyayyayalyyaaallayaaaylalllaylyayyallyyayaylalllyyall.
145. By NEMO.
Y Y I Z C U O F Y V H Q Y H T B E B S X P T S Y C R M R X L X E A G U Y L P U Q B U U Q N Y U S O Q M O O S P U G I J I I F F F A L I R G G F G E H H N T E G Y Z S M C O F U D E M X O G I K K V B N K W K P Q X M G D L A I F N H M X T U M E Z X Y Z G N A P D W C D M N C T T H N J F D.
146. By PICCOLA. (We wouldn't throw monkey-wrenches for anything!)
X E I T B B B B V M X R S J P Y L K E N Y K S Z K F R W L G S A Y E A V I X I X D U V D U R J G E I B A N Z F H D C C Y C O Y R V A B K W B R H F K K F X S E J Y T F N L R N I V K V K Q H I Q H I J L P G O U J V F C F T S H L I D V D D M P.
147. By DAN SURR. (Might try this without bothering about its progression!)
E C G M H T Y T A J B T H N G A W K L I B E M N R H T D G N G P D A O Q A X R P Z P F H D D X I E A U B S Y C I X C W V R H P B O I X Y P Y D V W N R N X O O K K I H F O X D S V L V W W C L I H Z H V W R L H W M M I E E A H G Q Y R S R L K L W Z T J A Y W F N S S U C V Z L P X P S E E E Y R T H D H T Z N U P U R M G K Z N T Y E Q D E Z E N N H W M I N R L P S S W P Y M C R U B J Z Y C R N L M A S M E U C L R M D Y R N E S T O B V J E U D V L O T S Q B J H B N R L B V D X J P X N I G F I C Q J Y Q Z X Q G K B L F Q U B Q K N E L S S L Y G T L F L T D Z Z Y K E E R H K L W L I M R N J S O O J P Q C A U D M E I B B Q X A H C V A J C M G X B I C D K V C L G Q I B S C F V F W Q N A X I D R Z S X R B I W R C Q R.
148. By PICCOLA. (When is a tramp not a tramp?)
E R N I C D M R A S T A A P H T P I L T Q V A A S N E A E E R O O L R.
Chapter XXI Polygram Substitution — The Playfair Cipher
Polygram substitution contemplates the encipherment of several letters collectively: Digrams are to be replaced with other digrams, or with three-digit numbers; trigrams are to be replaced with other trigrams, or with four-digit numbers; and so on, the substitute for an individual letter being entirely dependent upon the combination in which it happens to occur. Many devices have been contrived for accomplishing this. For pair-encipherment, tableaux of the general kind shown in Fig. 164 are fairly common.
Figure 164
A M E R I C N B D F G H J K L O P Q S T U V W X Y Z
E AA BA CA DA EA FA GA HA IA JA KA LA MA NA OA PA QA RA SA TA UA VA WA XA YA ZA Q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB U AC BC CC DC EC FC GC HC IC JC KC LC MC NC OC PC QC RC SC TC UC VC WC XC YC ZC A AD BD CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD L AE BE CE DE EE FE GE HE IE JE KE LE ME NE OE PE QE RE SE TE UE VE WE XE YE ZE I AF BF CF DF EF FF GF HF IF JF KF LF MF NF OF PF QF RF SF TF UF VF WF XF YF ZF T AG BG CG DG EG FG GG HG IG JG KG LG MG NG OG PG QG RG SG TG UG VG WG XG YG ZG Y AH BH CH DH EH FH GH HH IH JH KH LH MH NH OH PH QH RH SH TH UH VH WH XH YH ZH B AI BI CI DI EI FI GI HI II JI KI LI MI NI OI PI QI RI SI TI UI VI WI XI YI ZI C AJ BJ CJ DJ EJ FJ GJ HJ IJ JJ KJ LJ MJ NJ OJ PJ QJ RJ SJ TJ UJ VJ WJ XJ YJ ZJ D AK BK CK DK EK FK GK HK IK JK KK LK MK NK OK PK QK RK SK TK UK VK WK XK YK ZK F AL BL CL DL EL FL GL HL IL JL KL LL ML NL OL PL QL RL SL TL UL VL WL XL YL ZL G AM BM CM DM EM FM GM HM IM JM KM LM MM NM OM PM QM RM SM TM UM VM WM XM YM ZM H AN BN CN DN EN FN GN HN IN JN KN LN MN NN ON PN QN RN SN TN UN VN WN XN YN ZN J AO BO CO DO EO FO GO HO IO JO KO LO MO NO OO PO QO RO SO TO UO VO WO XO YO ZO K AP BP CP DP EP FP GP HP IP JP KP LP MP NP OP PP QP RP SP TP UP VP WP XP YP ZP M AQ BQ CQ DQ EQ FQ GQ HQ IQ JQ KQ LQ MQ NQ OQ PQ QQ RQ SQ TQ UQ VQ WQ XQ YQ ZQ N AR BR CR DR ER FR GR HR IR JR KR LR MR NR OR PR QR RR SR TR UR VR WR XR YR ZR O AS BS CS DS ES FS GS HS IS JS KS LS MS NS OS PS QS RS SS TS US VS WS XS YS ZS P AT BT CT DT ET FT GT HT IT JT KT LT MT NT OT PT QT RT ST TT UT VT WT XT YT ZT R AU BU CU DU EU FU GU HU IU JU KU LU MU NU OU PU QU RU SU TU UU VU WU XU YU ZU S AV BV CV DV EV FV GV HV IV JV KV LV MV NV OV PV QV RV SV TV UV VV WV XV YV ZV V AW BW CW DW EW FW GW HW IW JW KW LW MW NW OW PW QW RW SW TW UW VW WW XW YW ZW W AX BX CX DX EX FX GX HX IX JX KX LX MX NX OX PX QX RX SX TX UX VX WX XX YX ZX X AY BY CY DY EY FY GY HY IY JY KY LY MY NY OY PY QY RY SY TY UY VY WY XY YY ZY Z AZ BZ CZ DZ EZ FZ GZ HZ IZ JZ KZ LZ MZ NZ OZ PZ QZ RZ SZ TZ UZ VZ WZ XZ YZ ZZ
The tableau proper includes a full list of the 676 possible two-letter combinations, while two external alphabets will furnish another possible 676 two-letter combinations. With the plaintext marked off into pairs, the encipherment of a pair is usually accomplished by finding its two letters in the two external alphabets, where they act as co-ordinates, and replacing this pair with the one which is found at the cell of intersection. Thus, using the tableau of the figure, and the order row-column, the substitute for th would be LG; or, using the order column-row, TN. With a tableau like that of the figure (notice the straight unshifted alphabets), it is also possible to encipher by what is ordinarily considered the decipherment process, finding the plaintext pair inside the tableau and replacing it with the two co-ordinates. But many of these tableaux are filled in a thoroughly haphazard manner, and when this is the case, only the ordinary encipherment plan is really feasible; in fact, the decipherer has trouble in finding his cryptogram pairs, and it is usually necessary that a second tableau be prepared especially for decipherment purposes. On the other hand, it is very easy to construct a mixed tableau in such a way that all of its encipherment is reciprocal, and in this case there is no need for a second tableau, since encipherment and decipherment are the same process. In most forms of tableau, one or both of the external alphabets may be made to slide and for the most part external alphabets are readily changeable. But the tableaux themselves will have to be of more or less fixed nature. Those which are safest are least readily reconstructed from memory, and even those most easily remembered are not set up very rapidly.
Another common method for pair encipherment can be understood from the following description: Picture a chart of 100 cells which is divided sharply into four quarters; that is, having much the appearance of a 100-cell Fleissner grille. Each of the four quarters is a 5 x 5 square and contains a 25-letter alphabet. At least two of these alphabets are mixed, usually with different keys. To encipher a pair, find its two letters in two different squares, and substitute two others which occupy certain relative positions in the other two squares.
Figure 165
The "SLIDEFAIR" Cipher -(H. F. GAINES)
Key: H E R C U L E S
Plaintext: SE ND DI AM ON DS TO AM CIPHER:..... XZ ZR RU KC TI HO KX US
St Er Da Mm on Da Yw Ee ..... Mz Ni Ju Ko Ti Po Sc Mw
Kw It Ho Ut Fa IL ..... Pr Pm Xy Rw Gz at
Cryptogram taken off: X Z Z R R U K C T I H O K X U , etc.
The writer’s own contribution, accomplished with a slide, may be examined in Fig. 165; the slide used in the example was the Saint-Cyr, and details are self-explanatory, except for the method of enciphering pairs, which was as follows: To encipher those of the H-column, bring the H-alphabet into position on the slide; then, for each pair, find its first letter in the upper alphabet and its second letter in the lower one; imagine these to be standing at the two ends of a diagonal, and substitute the two letters from the two ends of the corresponding cross-diagonal, taking the upper one first. Where the two plaintext letters happen to coincide (as would be the case with a pair EL using the H-alphabet of the Saint-Cyr slide) use the two letters which have also coincided immediately to their right (as FM for EL in the given case).
Occasionally, such a tableau as that of Fig. 164 is made to serve (not very successfully) for trigram encipherment. A third external alphabet is added beside one of the others, so that the two which are parallel will make provision for the encipherment of a third letter simultaneously with the encipherment of each pair. But for trigram encipherment, another type of tableau is commoner: The tableau proper is not a list of pairs, but an alphabet square such as could be prepared for one of the mixed-alphabet slides of Chapter XVIII, and is accompanied by four external alphabets, two on the left and two across the top. The exact details of construction are not always the same, and the methods prescribed for using such a tableau are sometimes quite devious, but results are fairly uniform: We obtain cryptograms in which enciphered pairs have alternated with enciphered (sometimes not enciphered!) single letters.
In all of the foregoing, no system has been mentioned which the student will not be able to analyze for himself. At worst, he has a case very much like simple substitution, except that he would require a great deal more material, and would use a digram chart instead of a frequency list. Otherwise, he usually finds that he has merely a variation of pure periodic encipherment. There are, of course, more effective methods. Trigrams, tetragrams, and other polygrams, found in alphabet squares, can always be considered as geometrical figures, and replaced with other series of letters in related geometrical figures; and Lester S. Hill, in the American Mathematical Monthly, has described an “algebraic” method which appears practical, provided a machine is used. These methods, however, even granting that some are practical and not too unwieldy for use, are entirely beyond our present scope, and we will spend our few remaining pages on a cipher of a less cumbersome nature and presenting far more points of interest.
Figure 166
The PLAYFAIR Cipher
KEY Encipherment Some Equivalent Keysquares
C U L P E (1) bl = IB L P E C U N O Q S T Y Z V W X R A B D F ez = FE B D F R A V W X Y Z P E C U L G H I K M (2) cl = UP I K M G H C U L P E D F R A B N O Q S T ce = UC Q S T N O R A B D F K M G H I V W X Y Z (3) th = OM X Y Z V W G H I K M S T N O Q ht = MO
Example:
SE ND DI AM ON DS TO AM ST ER DA MX MO ND AY WE EK WI TH OU TF AI LX. TP SR BK FH QO KY NQ FH TN CF FB IZ HT SR DW ZU PM XH OM WA ZM BH BL.
* * *
The Playfair cipher, which may be examined in Fig. 166, requires no apparatus other than pencil and paper. Its key is the usual 5 x 5 square, based on a key-word, and filled in by any agreed plan (preferably not by straight horizontals). For encipherment, the plaintext is marked off into pairs, and these pairs are enciphered according to three very simple rules:
1. If the two letters of the pair are found in the same column in the key-square, replace each letter with the one directly beneath it; and if one letter stands at the bottom of the column, use the one standing at the top of the same column. With the key of the figure, ha becomes OH; wa becomes UH.
2. If the two letters of the pair are found in the same row in the key-square, replace each letter with the one immediately to its right; and if one letter stands at the extreme right end of the row, use the one standing at the extreme left end of the same row (os becomes QT; st becomes TN).
3. If the two letters of the pair have a diagonal relationship in the key-square (and these are usually in the majority), consider them to be standing at the diagonally opposite corners of an imaginary small rectangle, and substitute for each letter that letter of the other diagonal which stands on the same row with itself (bu becomes AL, not LA). The decipherment rules, as usual, are the same rules in reverse.
* * *
Notice that this encipherment is cyclical. So long as the order 1-2-3-4-5 is maintained in both columns and rows, it makes no difference whatever how many columns are transferred from one side to the other, or how many rows are transferred from top to bottom. This may be investigated in the three equivalent squares of the figure. Notice, too, that our three rules do not make any provision for the case in which the two letters of a pair are the same. If, in marking off the plaintext into pairs, we encounter a pair which is a double, it becomes necessary to dispose of this, usually by inserting a null which will throw the second letter into the next pair. Occasionally we find a sequence such as LESS SEVEN, in which it is necessary to do this twice in succession: LE Sx Sx SE VE Nx. An unpaired final letter also requires a null (unless left unenciphered), and when five-letter groups are to be used, it often becomes necessary to complete a final group by adding nulls.
The foregoing description and rules are those of the original Playfair cipher. Many encipherers, however, will vary the rules, especially the one concerning doubles; perhaps one letter will be omitted or replaced with a null; sometimes one double is replaced with another; occasionally an encipherer will separate every doubled letter in the message whether or not this is necessary. We meet, too, with variant forms. A 24-letter alphabet will be used in a 4 x 6 rectangle, or a 27-letter alphabet (with character &) will be used in a 3 x 9 rectangle. One variation, attributed to W. W. Rouse-Ball, uses the standard key-square with the standard rule 3, but varies the two rules for lineal encipherment. Rule 1: If the two letters of the pair stand in a column, use the two letters immediately to their right. Rule 2: If they stand in a row, use the two letters immediately beneath them. In all of these cases, presuming the method to be known, the degree of difficulty would be the same as if the standard system had been used; otherwise, it is only necessary to keep in mind the fact that variations occasionally occur. We will give our attention, then, to the standard encipherment. But before entering into the subject of decryptment, let us look carefully at the system itself.
Primarily, we have a fixed substitution. No plaintext pair ever has more than one substitute pair; and no substitute pair ever changes its original. We might say that the Playfair is, in effect, a “simple substitution” based on an “alphabet” of 600 pairs; and, just as in simple substitution proper, the Playfair cryptograms will very often contain long repeated sequences which represent whole words. Again, the reversal of a plaintext pair means the reversal of its substitute pair, and vice versa, so that the discovery of any one equation (as th = OM) always means the discovery of another (as ht = MO); and if, in addition, the encipherment was a rectangular one (rule 3), we obtain also the two reciprocal equations (as om = TH, and mo = HT). The two lineal encipherments, however (rules 1 and 2), are not reciprocal. But notice particularly that, in spite of the polygram theory, each letter has its individual substitutes. No letter in the key-square may have more than five of these; the four which are standing on its own line, and the one which stands directly beneath it. It may be learned, too, by writing out the 24 (or 48) possible pairs for any one given letter, that the letter standing immediately to its right in the key-square is twice as likely as any one of the other four to act as its substitute; and, further than this, that any letter which is paired with it will be limited to eight possible substitutes, all of which must be found either in the column or on the row of the letter itself. To clarify this important point, let us assume that the letter in question is E, and that the key-square is that of Fig. 166. The letter E may have only the substitutes C, U, L, P, and F, with C twice as likely to be used as any one of the other four. Any letter which is paired with E must take one of the following substitutes: U L P E F M T Z.
Naturally, then, those letters which, in the key-square, are standing on the same row or in the same column with the normally frequent letters will have high frequencies in the cryptograms; in fact, the two or three which predominate in a given cryptogram will practically always be letters which, in the key-square, were standing in the same row or column with E or T (in English). Moreover, if any letter has been identified once as the substitute for E, there is a most excellent chance that it can be identified again as the substitute for E. Say, for instance, that CF has been identified, or assumed, as the substitute for er. This means that C is individually the substitute for e, and when another pair CT is found to be of some frequency, it can be tried as the substitute for en, es, et, and so on. Single-letter frequencies, then, will play an important part in the decryptment of the Playfair. But the process will rest fundamentally upon the frequencies of digrams, and will follow, in general, three steps repeated over and over in the same rotation:
1. Certain pairs are identified, or assumed, as the substitutes for certain digrams.
2. These pairs and their supposed originals are set together in such a way as to start the reconstruction of the key-square.
3. Substitutions are made on the cryptogram and further pairs are identified.
When probable words exist, the work of solution becomes more or less mechanical, as we shall see. At worst, we may begin at the beginning of the cryptogram and work straight through until we find the word. But very often, a really probable word is repeated, and even repeated more than once. In the latter case, we are sure to find the long repeated sequence in the cryptogram; while a word repeated only once may have been divided into two different sets of pairs, as: ex-ec-ut-io-n and e-xe-cu-ti-on. But notice, here, what the two encipherments would be, using our key-square of the figure: LZ CU EO HQ x and x ZL UL QM QO. These two sequences have five letters in common, L Z U O Q, and, in addition, when considered together, show the letters E C U O of the word “execution.” This does not invariably happen, but is far from uncommon. Nor is the word “execution” the only one which produces reversal (ex in one sequence, xe in the other). Then, too, there are many words like “commission” which, regardless of the point at which the division begins, will always end in the same set of pairs: mi-s?-si-on.
Granting an absence of probable words, the difficulties of solution are almost entirely dependent upon the amount of material available. A pair-count will be made in the usual chart-form (but only on the divided pairs, and not “straddling” from one pair to another), and pairs will be identified by frequency, by the frequency with which they are found reversed, by the possibility of their letter-combinations in a key-square, and so on. We will not attempt, here, to go into a detailed demonstration, since every case is individual in its details, and success, in all of them, is dependent largely upon the decryptor’s own persistence. But in order to see sketchily what some of the routine might be, we will make use of the very short example shown in Fig. 167.
In the usual case, there has been a preliminary frequency count on single letters in order to find out what the cipher is. The appearance of this frequency count has more or less negatived the possibility of simple substitution, and the next step has been a Kasiski tabulation in the hope of finding a period. This tabulation, in any pair-system, will bring out a predominant factor 2, and, since many of the supposed digram systems actually do produce periods, the two supposed alphabets would have been examined for that possibility. But pair-systems, as a rule, will leave a wide-open trail: Repeated sequences, in the majority of cases, will include an even number of letters (that is, an exact number of pairs), and will begin largely at the odd serial positions (that is, at the beginnings of pairs). The Playfair shows this a little less distinctly than some of the others, because of the fact that substitutes for single letters are so limited in number.
It is sometimes said of the Playfair that it can be distinguished from other ciphers by (1) the fact that cryptograms contain an even number of letters, (2) the fact that only 25 letters are represented in its general frequency count, (3) the fact that when the cryptogram is marked into pairs, no pair will be a doubled letter, and (4) the presence of long repeated sequences at irregular intervals. As conclusive evidence, these are debatable points, but all are good supporting evidence, provided a proper confession can be extracted from the pair-chart: (5) When the cryptogram has been marked off into pairs, and the pairs counted, the result should bear much resemblance to a count made on the same number of normal digrams. Even on an extremely long cryptogram, over half of the cells will be blank, since a normal text never uses more than about 300 of the possible 676 combinations; there will be a certain group of predominant pairs followed by a group of moderate frequencies; and, with any appreciable length, there will be a generous sprinkling of reversals. In preparing the cryptogram, a great deal of convenience may be had by placing frequency figures beside their digrams, by marking long repeated sequences, noticeable reversals, and so on; and many persons like to list the most prominent pairs and the most prominent reversals.
Figure 167