38.

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


Chapter 4
Transposition-based Monoalphabetic Substitution

This chapter focuses on three commonly used methods to develop a mixed alphabet. The first two methods are related to the use of arrays, or matrices, while the third method can be considered a position and extraction technique. After you obtain an understanding of the manual process required for the formation of a transposition mixed alphabet and the encipherment of a message using that alphabet, I’ll turn your attention to automating the process. I’ll show you how to develop a series of subroutines you can use to perform different types of transpositions and then incorporate those subroutines into a program. When possible, previously created subroutines will be used to take advantage of your previous efforts.

Matrix-Based Transposition

By placing an alphabet into an NxN matrix, or array, you can obtain the ability to extract characters in many different ways. For example, consider the sequential plaintext alphabet placed into a 7x4 matrix as illustrated in Figure 4.1. Each character in the alphabet is referenced by a row and column position and can be considered an element in the array or matrix. By extracting matrix elements in a predefined sequence, you can develop a transposed alphabet.


Figure 4.1  Placing the plaintext alphabet into a matrix. Each character in the matrix is identified by its row and column position.


Perhaps the earliest use of a matrix with a cryptographic alphabet can be traced to the Greek writer Polybius. He arranged the Greek alphabet into a square and numbered the rows and columns whose values identified the location of each letter. This enabled each letter to be identified by a pair of numbers that represented the intersection of a row and column in the matrix.

In addition to devising the use of a matrix for cryptographic applications, Polybius suggested the use of his matrix as a mechanism to transmit information by torches. Polybius proposed that letters in the alphabet could be transmitted over relatively long distances by persons holding a different number of torches. For example, a person holding one torch at his right and two to his left would signal the letter located at the intersection of the first row and second column in the matrix.

The formation of an alphabet into a matrix was rediscovered by modern cryptographers and forms the basis for developing a large number of encipherment systems. Some systems convert letters into numbers, while other systems use the matrix to form different types of alphabets based upon the extraction of row and column entries using a predefined algorithm.


If you extract the matrix elements in each column commencing with column seven and then work backwards, extracting the elements in column six, column five, and so on, the transposed alphabet GNUFMTELSZDKRYCJQXBIPWAHOV is created. If we extracted the matrix elements in a progressive column order, we would obtain the transposed alphabet AHOVBIPWCJQXDKRYELSZFMTGNU.

Unfortunately, the placement of a plaintext alphabet into a matrix results in the development of a transposed alphabet in which several sequences of letters are displaced by fixed positions, making the job of a cryptanalyst easier if he or she attempts to reconstruct the transposed alphabet used to encipher messages. To add a degree of difficulty to any reconstruction attempt, these alphabets are normally developed through the use of a keyword or keyword phrase.

Figure 4.2 illustrates the construction of a keyword-based alphabet fitted into a 7x4 matrix, using KEYWORD as the keyword. Similar to the keyword-based alphabets discussed in Chapter 3, Keyword-Based Monoalphabetic Substitution, you can use either a keyword or keyword phrase to develop a mixed alphabet. Then, by placing the resulting alphabet into a matrix you can develop a transposed keyword-based mixed alphabet. The construction of this alphabet is easy to duplicate, providing the message recipient with an easy mechanism for preparing to decipher a received message. In addition, using a keyword or keyword phrase adds an additional degree of difficulty to a cryptanalyst attempting to decipher a message that intentionally or unintentionally falls into his or her hands.


Figure 4.2  A keyword-based mixed alphabet placed into a matrix. In this example, the keyword KEYWORD was used to form the keyword-based mixed alphabet.

In examining Figure 4.2, note that the keyword used is seven positions in length and defines the number of columns in the matrix. When developing the keyword-based mixed alphabet, remember to first remove any duplicate letters in the keyword or keyword phrase and then add the remaining letters of the alphabet that are not in the keyword or keyword phrase in the sequence in which they appear in the alphabet. For example, the keyword ALPHA would be reduced to ALPH to eliminate the duplicate A. This would result in the creation of a matrix with four columns.

Simple Transposition

There are several methods that can be used to develop a transposed keyword-based mixed alphabet. Perhaps the most obvious method, referred to as simple transposition, extracts column entries in their column order. The simple transposition of the keyword-based alphabet illustrated in Figure 4.2, in which the keyword is KEYWORD, produces the following keyword-based simple transposed alphabet: KAJTEBLUYCMVWFNXOGPZRHQDIS.

After you obtain the transposed alphabet, you can use it for the plaintext or ciphertext alphabet. In addition, you could create two different transposed alphabets and use one for the plaintext alphabet and the second for the ciphertext alphabet. The examples presented in this chapter restrict the use of transposed alphabets to the ciphertext alphabet.

Encipherment

Similar to previously described manual encipherment processes, you should list the plaintext alphabet above the ciphertext alphabet. For each character in the plaintext message, you would first locate that character in the plaintext alphabet and extract the corresponding character by position in the ciphertext alphabet. Figure 4.3 illustrates the encipherment of the first two characters of a plaintext message using the previously developed keyword-based simple transposed alphabet.


Figure 4.3  Encipherment using a keyword-based simple trasposed alphabet.


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