next up previous
Next: Vigenère Cipher Up: crypto Previous: Improving a Substitution Cipher

Permutations

Another obvious method to encode a message is to jumble the letters in some way so that the recipient can simply unjumble them. Here's a very simple way to do it that's not very secure, but it shows you the idea.

First, break the message up into chunks of 25 letters. If there is some left over at the end, add enough junk to extend the last chunk to be 25 letters, too. Each of the chunks is then encoded by itself. Here's an example of the encoding of a very short message: ``WHO IS THAT CUTE GIRL?''.

First off, it is not even 25 characters long, so let's extend it (I'll use the letter ``X'' for the extension, but it would be much better to use more innocent-looking letters. Here's the 25 character chunk: ``WHOISTHATCUTEGIRL?XXXXXXX''.

Next, lay out the letters in a $5\times 5$ square as follows (obviously it would be better to leave out the the punctuation):

W H O I S
T H A T C
U T E G I
R L ? X X
X X X X X

Then just read out the text by columns instead of rows, so the encoding of the phrase becomes: ``WTURXHHTLXOAE?XITGXXSCIXX''. To decode the message, simply write characters in the columns of a $5\times 5$ grid and read the message out of the rows.

If this is the only thing that's been done, it is very easy to crack the encoding. For one thing, when you check the frequency, you notice that it is the same as in standard English, so it may just be a transposition code. But there is nothing to prevent you from doing a substitution cipher first, and then encoding as above. The nice thing about the above jumbling is that it will destroy any letter pair or letter triple frequencies.


next up previous
Next: Vigenère Cipher Up: crypto Previous: Improving a Substitution Cipher
Zvezdelina Stankova-Frenkel 2000-12-17