# Breaking The Rectangular Transposition Encryption System

We shall view Rectangular Transposition in a slightly different manner than we did originally. We assume that the sender and receiver choose a secret period p and a secret permutation of length p, say a=(a1,a2,...,ap) where each ai is taken from the set {1,2,...,p} and no two are the same. The plaintext is broken up into blocks of length p and then each block is transposed by the permutation a. For example, if the (i+1)st block of plaintext is Xip+1,Xip+2,...,Xip+p, then the (i+1)st block of cyphertext would be Xip+a1,Xip+a2,...,Xip+ap. This encryption system is vulnerable to a biletter-frequency analysis, since letters that are close together in the plaintext message, tend to stay close together in the cyphertext message.

To break Rectangular Transposition encryption, one guesses a period p and then, uses the given matrix of statistics to determine the validity of p according to the following cases

1. All the entries in the matrix are approximately the same
2. Each row except one has a maximum that is much larger than all the other entries in the row. Similarly, each column except one has a maximum that is much larger than all the other entries in the column.
In case 1, the opponent concludes that p was a wrong guess for the period and proceeds to repeat the calculations with another value of p. In case 2, the opponent guessed that p is the right value and from the matrix, reconstructs the permutation by clicking on the cell that contains the maximum value.

The Applet below is programmed to illustrate this codebreaking process.

• Upon pressing the Random Cyphertext button, the Applet will display some text which is Rectangular Transposition encrypted by a randomly selected key.
• Press the Break button to start the process. The Applet assumes (most often incorrectly) that p=2. Thus it proceeds as if every pair of letters of plaintext was encrypted by reversing the order of the pair. It displays the matrix of statistics and a visual representation of the permutation.
• Press the Period + several times (if necessary) until an appropriate value of p is obtained. Of course, an appropriate value is found according to the above criteria.
• Now click in the cells of the matrix that contain the largest value in each row. Arrows will be drawn on the permutation to help keep track of it. For instance, after clicking in the ith row and jth column, an arrow is drawn from i to j to indicate that the ith letter of cyphertext was most likely followed by the jth letter of cyphertext.
• Now you may press the Decrypt button. The Applet will then decrypt the given cyphertext as if it was encrypted by means of the values of a1,a2,...,ap you have just determined. A look at the resulting text will make it clear if all of your guesses were correct or which, if any, need to be changed. [Back| Home| Programs| Documentation| Internet| People]