48.

Learn Encryption Techniques with BASIC and C++
(Publisher: Wordware Publishing, Inc.)
Author(s): Gil Held
ISBN: 1556225989
Publication Date: 10/01/98

Previous Table of Contents Next



One of the more interesting matrix-based enciphering techniques operates upon pairs of characters to reduce the potential for a frequency analysis providing an easy mechanism to decipher messages. Although referred to as the Playfair cipher after Lyon Playfair, a scientist of Victorian England and the Deputy Speaker of the House of Commons, in actuality, the cipher was developed by Playfair’s friend and close associate Charles Wheatstone.

The Playfair cipher system is based upon the formation of a keyword mixed alphabet that is contained in a 5x5 matrix, where the letters I and J are regarded as identical and combined to reduce the English alphabet to 25 letters. Thus, the use of the keyword QUALE would result in the following alphabetic matrix being used for encipherment.

 Q   U     A   L   E B   C     D   F   G H   I/J   K   M   N O   P     R   S   T V   W     X   Y   Z 

The encipherment of messages occurs using pairs of letters—a technique referred to as digraphic encipherment. The rules governing the encipherment of each pair of characters is based upon the relationship of the letters to one another in the keyword-based matrix. Because there are only three possible relationships between letters in the matrix, there are three rules that govern encipherment.

If a pair of letters falls within the same row, they are replaced by the letters to their right, with each row considered cyclical so that the letter to the right of the last letter in a row becomes the first letter in the row. Thus, the pair of letters ST would be replaced by TO, while QU would be replaced by UA.

The second rule governing the encipherment of pairs of letters is applicable to letters that appear in the same column. Similar to the rule governing the replacement of pairs of letters contained in the same row, letters that appear in the same column are replaced by the letter beneath each letter. Here, the cyclical provision results in the letter below the last letter in the column being the letter at the top of the column. Thus, DR would be enciphered as KX, while ZE would be enciphered as EG.

The third rule governing encipherment is applicable to the situation in which a pair of plaintext letters is not located in a common row or column. When this occurs, each letter is replaced by the letter located in its own row at the column position occupied by the other plaintext letter. Thus, under this rule DE would be replaced by GA, while TH would be replaced by ON.

To further reduce the ability of frequency analysis as a decipherment tool, any double letter occurring in a pair is separated by the use of an X. Thus, HOLLY would become HOLXLY if the pair of L letters was on a pair boundary.

The use of digraphs by the Playfair cipher extends the cipher combinations from 26 letters when a one-for-one monoalphabetic substitution process is used to either 625 or 676 digraphs, depending upon the manner in which the I/J letter combination is used. Not only does this technique provide a substantial expanded base of characters for a frequency analysis, but it results in forcing an analysis to be performed on letter pairs whose frequency of occurrence has substantially less divergence than single letters. For example, the two most common letters in the English language, E and T, have an average frequency of approximately 12 percent and 9 percent, respectively. In comparison, the two most common letter pairs, TH and HE, have a frequency of occurrence of 3.5 percent and 2.5 percent.

During World War II, the Playfair cipher was used by Australian coast watchers hiding on many Japanese occupied islands in the South Pacific. Using the keys ROYAL NEW ZEALAND NAVY and PHYSICAL EXAMINATION, messages were transmitted concerning the loss of PT 109 which led to the rescue of Lieutenant John F. Kennedy and his PT boat crew.



Previous Table of Contents Next


Learn Encryption Techniques with Basic and C++
Learn Encryption Techniques with BASIC and C++
ISBN: 1556225989
EAN: 2147483647
Year: 2005
Pages: 92
Authors: Gil Held

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net