Background
The Phillips cipher is a periodic, poly-alphabetic, substitution cipher. It had its origin as a World War I tactical field cipher.
The Encipherment System
The substitution alphabets are based on a 5×5 keyed Polybius square that is formed in any of the usual ways. The initial square is labeled square #1. The first row of the square is shifted down one row at a time to form squares #2, #3, #4 and #5. Row two is then shifted down one row at a time to form squares # 6, # 7, and #8.
The plain text is enciphered by first dividing it into blocks of 5 letters each. Each block is enciphered using one of the eight Polybius squares in numerical sequence (i.e., Squares #1 through # 8 in numerical order). Individual letters are enciphered by substituting the letter in the square which is below and to the right of the plain text letter (Substitution for letters at the bottom or right side occur at the top and left side respectively). Once square #8 has been used the process starts over with Square #1.
Deciphering is the reverse of enciphering.
Example
- Keyword: SONGBIRD
- Plain Text: The early avian gets the squirmy annelid. Yummy!
Form the eight squares:
1 S O N G B 2 I R D A C 2 I R D A C 2 I R D A C
2 I R D A C 1 S O N G B 3 E F H K L 3 E F H K L
3 E F H K L 3 E F H K L 1 S O N G B 4 M P Q T U
4 M P Q T U 4 M P Q T U 4 M P Q T U 1 S O N G B
5 V W X Y Z 5 V W X Y Z 5 V W X Y Z 5 V W X Y Z
# 1 # 2 # 3 # 4
2 I R D A C 3 E F H K L 3 E F H K L 3 E F H K L
3 E F H K L 2 I R D A C 4 M P Q T U 4 M P Q T U
4 M P Q T U 4 M P Q T U 2 I R D A C 5 V W X Y Z
5 V W X Y Z 5 V W X Y Z 5 V W X Y Z 2 I R D A C
1 S O N G B 1 S O N G B 1 S O N G B 1 S O N G B
# 5 # 6 # 7 # 4
Encipherment
S: 1 2 3 4 5 6 7 8 P: theea rlyav iange tsthe squir myann elidy ummy C: ZTPPL NMCBR FLTUO BWBTP RYVFH WBUKK PMWYB VWWC Message: ZTPPL NMCBR FLTUO BWBTP RYVFH WBUKK PMWYB VWWC
The student should study the above example to become familiar with the encipherment and decipherment methods since this knowledge is critical for the cryptanalysis of the cipher.
Cryptanalysis
The cryptanalysis of this cipher primarily involves reconstructing the key square (Square #1). This is done by matching pieces of the cipher text with plain text and reconstructing the square from the identified plain/cipher text equivalences.
The cipher has several unique features which should be identified at this point:
Note that 40% of the plain text/cipher text relationships remain the same between succeeding squares. For instance, rows 3, 4, and 5 maintain there positions with respect to one another in square #1 and square #2. As a result, row 3 letters encipher as row 4 letters and row 4 letters encipher as row 5 letters in both squares. This can help identify the rows occupied by an identified plain/cipher pair.
Note that the encipher pairs produced by Square #1 and Square #5 are identical. The same is true of squares #2 and #8. This can help identify plain text enciphered by one square based on results enciphered by another.
Example Analysis
The example we will be working on is from the log of a puzzle type Geocache in New England. The cipher is:
Phillips. Podcacher Tribute LPC Cache MSCREP
RLGUD PXDIH AYION PXSSN LKULL RYXDX QUDCG QXFOY IUXQX DDQEP NWEXI WSBAV UBPGX BRDKD UTDHG NDEDD ROQCL FUYZF XEXMM QKPWS QKPBW CXPFD RADRF TITPD QRQIR FADCY XRZPN PYWWP LHGRL YUIKR PICDN FHDD (near four three degrees)
Note the following:
- The plain text “near four three degrees” has been given as a crib. Phillips ciphers published in the “Cryptogram” are normally provided with a healthy crib.
- The latitude and longitude coordinates of an object (the “cache”) are enciphered in this CON. Consequently, we should expect the plain text to primarily be long hand numbers (As already seen in the crib).
- The cache log states that the cache is within a half mile of 43 degrees 19.433 minutes North and 070 degrees 53.119 minutes West. This point is within the State of Maine.
- Most geocaches are hidden in stumps, under logs, in stonewalls, or under trees. Caches can contain a log book, “stash”, geocoins, and/or travelbugs.
- The “LPC” in the cache title stands for “Laborious Phillips Cipher” and is meant as a joke. In Geocaching an LPC is a “Lamp Post Cache”. The Podcacher (To whom the cache has been dedicated as a tribute) hates LPCs.
Crib Placement
The first order of business is to locate the crib in the cipher text. The crib is “near four three degrees” and contains many doubles and repeats of the letter “e”. The crib can be located by looking for this pattern in the cipher text. Be aware that this crib will be spread across several 5 letter sections so the letter “e” may not always be enciphered by the same cipher text letter. However, a portion of the pattern (especially the “ee” digraph) should survive.
Examination of the cipher text will quickly identify a likely position for the crib at position 7. Specifically:
Sqr #: 2 3 4 5 6 CT: PXDIH AYION PXSSN LKULL RYXEDX PT: *near fourt hreed egree s*****
Note that the “e” has been enciphered by a different cipher text letter in each square (Squares 2, 4, and 5). This argues that “e” is positioned in row 1 and that as that row moves downward in the key square, the CT value for “e” changes.
In square 2, we have e=D. Looking at the example above, we see that row 1 is enciphered by row 3 in square 2. This implies that the letter D is in row 3. Similarly, in square 4 we have e=S. From the example above, we see that row 1 is enciphered by row 5 in square 4. This implies that the letter S is in row 5. Finally, in square 5 we have e=L. This implies that L is in row 2. This provides the beginnings of a key square. Specifically:
1 * * E * * 2 * * * L * 3 * * * D * 4 * * * * * 5 * * * S *
Note that the column that “E” is located in may not be correct. However, for this is not important since the key square columns may all be shifted left or right with no effect on plain text encipherment. When more of the key square is recovered, it should be possible to determine the correct number for each column.
Now note that d=N in square 4. “D” had already been located in row 3. This implies that “N” must be in row 4. This supplies:
1 * * E * * 2 * * * L * 3 * * * D * 4 * * * * N 5 * * * S *
Now note that s=R in square 6. “S” has already been located in row 5. This indicates the “R” must be located in row 1. This provides:
1 * * E * R 2 * * * L * 3 * * * D * 4 * * * * N 5 * * * S *
Now note that r=H in square 2, r=O in square 3, and r= X in square 4. Since “R” has already been locate in row 1, this implies that H, O, and X are located in rows 3, 4, and 5 respectively. This provides:
1 * * E * R 2 * * * L * 3 H * * D * 4 O * * * N 5 X * * S *
A quick look at the key square shows that both N and O are in the same row. If these letters were not part of the key word for the square, we would expect them to directly follow one another in the square. Further, both S and X are in row 5. We would expect S to precede X in this row if these letters were not in the keyword. Shifting the columns of the key square to obtain this desired order provides:
1 * R * * E 2 L * * * * 3 D * H * * 4 * N O * * 5 S * X * *
Finally, note that t=N in square 3, h=P in square 4 and r=U in square 5. The positions of N, H, and R are known. This then provides that T is in row 1, that P is in row is in row 4, and that U is in row 2. This provides:
1 T R * * E 2 L * U * * 3 D * H * * 4 * N O P * 5 S * X * *
Note the satisfying “NOP” sequence in row 4. Nothing more of use can be derived from the crib. Substituting our partial key square back into the cipher yields:
1 T R * * E 2 L * U * * 3 D * H * * 4 * N O P * 5 S * X * *
RLGUD PXDIH AYION PXSSN LKULL RYXDX QUDCG QXFOY se*r* hne*r ***rt hreed e*ree s*nen *ne** *n*** IUXQX DDQEP NWEXI WSBAV UBPGX BRDKD UTDHG NDEDD *rn*n ee**h t**n* *e*** r*h*n *se*e n*er* de*ee ROQCL FUYZF XEXMM QKPWS QKPBW CXPFD RADRF TITPD s***e ***** n*n** **h*e **h** *nu*e s*es* ***he QRQIR FADCY XRZPN PYWWP LHGRL YUIKR PICDN FHDD *s**s **e** nd**t h***h e**se ****s h**ed *ree
Nothing in the uncovered plain text seems unusual. It appears our solution is on track.
Now examine the key square itself. Note that X is in the third position of the last row. Only Y and Z follow X in the alphabet. Assuming the final row is in the non key word portion of the key square, this implies that the last two letters in row 5 are Y and Z. Further notice that the gap between P and S in the key square has only one unfilled position. Once again, if we assume alphabetical order we would assume the sequence “QR” would fill in this area. However, the letter R is already present in the first row (Presumably it is a portion of the keyword). Therefore, Q must be the last letter in row 4. Finally, note the gap between H and N. The sequence “IKLM” would be expected to fill in this area. However, L is already present in row 2. Therefore, the three letters in this gap must be I, K, and M. Placing this new information in the key square and substituting into the cipher provides:
1 T R * * E 2 L * U * * 3 D * H I K 4 M N O P Q 5 S * X Y Z
RLGUD PXDIH AYION PXSSN LKULL RYXDX QUDCG QXFOY se*r* hne*r *ourt hreed e*ree sonen ine** in*** IUXQX DDQEP NWEXI WSBAV UBPGX BRDKD UTDHG NDEDD urnin eei*h t*inu *e*** r*h*n *se*e nzer* de*ee ROQCL FUYZF XEXMM QKPWS QKPBW CXPFD RADRF TITPD s*i*e **op* ninee i*h*e i*h** *nu*e s*es* ***he QRQIR FADCY XRZPN PYWWP LHGRL YUIKR PICDN FHDD isius **e*o ndp*t h***h e**se o***s h**ed *ree
A lot of plain text is now apparent. Note that the word “eight” is now apparent in the group 2 of line two. This means the g=E in square 2 and that G must be in row 2. Further, notice that the word “seven” is now apparent in group 6 of line 2. This means the v=K in square 6 and that V must be in row 1. Substituting into the key square provides:
1 T R * V E 2 L * U G * 3 D * H I K 4 M N O P Q 5 S * X Y Z
The key word “Travel Bug” is now apparent. Using this to finish off the keysquare provides:
1 T R A V E 2 L B U G C 3 D F H I K 4 M N O P Q 5 S W X Y Z
RLGUD PXDIH AYION PXSSN LKULL RYXDX QUDCG QXFOY searc hnear fourt hreed egree sonen inepo intfo IUXQX DDQEP NWEXI WSBAV UBPGX BRDKD UTDHG NDEDD urnin eeigh tminu tesno rthan dseve nzero degee ROQCL FUYZF XEXMM QKPWS QKPBW CXPFD RADRF TITPD sfive twopt ninee ighte ightm inute swest cache QRQIR FADCY XRZPN PYWWP LHGRL YUIKR PICDN FHDD isjus tbeyo ndpat hatth ebase ofavs haped tree
The divided plain text is:
Search near four three degrees one nine point four nine eight minutes north and seven zero degrees five two pt nine eight eight minutes west. Cache is just beyond path at the base of a V shaped tree.