O Z Y M A N D I A S
7 10 9 5 1 6 3 4 2 8
Next the plaintext is written in rows under the numbered keyword,
one letter under each letter of the keyword. Let's say that the plaintext
to be encrypted is Company has reached primary goal. It will look
like this:
Now the letters of the plaintext are copied down by reading them off columnwise in the order stated by the enumeration of the keyword. The result is the finished cryptogram, which - of course - are put into groups of five letters, like this:O Z Y M A N D I A S 7 10 9 5 1 6 3 4 2 8 c o m p a n y h a s r e a c h e d p r i m a r y g o a l
AHGAR YDAHP LPCYN EOCRM SIMAR OEA
To decrypt a received message enciphered by this method, one first must
calculate the number of letters present in the cryptogram. This is done
to see how many letters there originally were in the last row. As can be
seen above, the two last columns - the ones numbered 2 and 8 - only contains
two letters and this is important. Now the cryptogram above contains 28
letters and as a legitimate user of the crypto system, one knows that the
keyword is ten letters wide. Therefore the last row must consist of eight
letters only, the two final positions being empty. Keeping that in mind - or
better still, marking the two final position of row three in some way to indicate
that they shouldn't be used - one numbers the keyword letters (just as when
encrypting) and then start by writing the first three letters of the cryptogram
under keyword letter number one, thus:
O Z Y M A N D I A S 7 10 9 5 1 6 3 4 2 8 . . . . a . . . . . . . . . h . . . . . . . . . g . . . * *
O Z Y M A N D I A S 7 10 9 5 1 6 3 4 2 8 c . . p a n y h a . r . . c h e d p r . m . . y g o a l * *
Usually when employing a transposition cipher like the above, one adds dummy letters to make the final group five letters long if it isn't already full. It is important to do this before transposing the letters, otherwise the receiver can't calculate the columns that haven't a full number of letters if the last row isn't complete. In some cases the last row is always made complete by adding dummy letters, but that reduces the security of the cipher and isn't recommended (now, this cipher is quite easy to break anyway...).
A G A M E M N O N 1 4 2 5 3 6 7 9 8 s e n d a r m o u r e d c a r t o h e a d q u a r t e r s j
This first encryption gives: srer-nddj-aau-eeas-dcq-rra-mtr-uhe-oot.
These letters are written under the second keyword, thus:
M Y C E N A E 5 7 2 3 6 1 4 s r e r n d d j a a u e e a s d c q r r a m t r u h e o o t
DEREE ACRRU QUDAA OSJSM ONERH RADTT
Double columnar transposition is substatially safer against cryptanalysis than single columnar transposition (not impossible, thou).
Here's a link someone sent me, to a program (Microsoft DOS) implementing the
double transposition cipher:
Alexander Pukall's Double Transposition Program.
Or, you can download my own program (C-source code and Windows DOS executable):
Toby's Double Transposition Program.
Here is an example of such a grille:
Using this grille, and turning it clockwise to encrypt the plaintext "We need more machine gun ammunition fast xx" will look like this:
Removing the grille will reveal the cryptogram:
If the gille is a square, but with an odd number of rows/columns, there will be a centre cell on the grille, which will - of course - always take the same position over the paper. One has to agree on a rule regarding this cell. Is it to be cut out and used when the grille is in the first position only? Or is it to be left uncut, thus leaving a blank cell on the paper when the grille is removed?
Other grille types exist beside the square type shown above. One could e.g. device a rectangular grille, and turn it, first upside down (i.e. 180 degrees), then turn it over, and so on.
Here is an example of a rectangular grille made after those principles: