Pages

Monday, November 25, 2013

Code 68 : Transposition Methods

Transposition Methods

Background

For substitution methods, plaintext characters are replaced by ciphertext characters. For transposition methods on the contrary, the characters stay the same, but their position in the text is changed. Transposition methods are used e.g. for the ADFG(V)XAMSCO and the Scytale cipher.

Principle

Let the plaintext be "ANGRIFF UM ACHT UHR" and the keyword be "MYKEY". Each character of the keyword creates one column. In the case of "MYKEY" this would correspond to five columns. Now, the plaintext is written into these columns from left to right character-by-character. If a line is full, a new line will be created, which results in such a matrix:
MYKEY
ANGRI
FFUMA
CHTUH
R    
In the last step, the columns are swapped. The keyword "MYKEY" is alphabetically sorted to do this. The first character is E, this column is therefore assigned to position 1. The next character in the alphabet is the K, this column is therefore assigned to position 2. Column M goes to position 3 and so on. Since we now have two columns with the corresponding character Y, their order is kept unchanged.
This procedure results in this matrix:
EKMYY
RGANI
MUFFA
UTCHH
  R  
To get the ciphertext, the matrix has to be read out column-by-column. The final ciphertext is: "RMUGUTAFCRNFHIAH".

Security

A sentence or a word that consists of relatively few characters can obviously only be permuted in relatively few different ways. A word with three characters can only be permuted in six different ways. With longer texts, the number of possible permutations increases drastically.
A random permutation of a relatively long text can be considered to be very secure. In the example mentioned above it would be sufficient to determine the key length and the order of the columns.

Details

Depending on the cipher that is used, reading in and out of the matrix can be line-by-line or column-by-column. In addition, the kind of permutation of the lines and columns can vary. In the preceding example, the permutation and reading out of the matrix was applied column-by-column and reading in of the matrix was done line-by-line. If the matrix had been read out in a line-by-line manner, the ciphertext would have been "RGANIMUFFAUTCHHR".

Weblinks

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.