end of the javascript functions

Railfence Transposition Ciphers.

The message is enciphered by writing it out on a "fence" made from rails and planks. You need to decide how many rails you are going to use.

Start at the top left corner and work down the first plank. Then go down th enext plank and so on. Make sure that you know whether or not you are keeping the spaces in the message.

Once you have reached the end of the message then simply write out the contents of the three rails starting with the top one.

If you keep the spaces then "hello world" on three rails becomes:

HLWLEOODL R

Whitespaces (blanks in messages) play havoc with lots of wordprocessor systems so it is probably best to strip all the spaces and punctuation out of your message.

Without the spaces, but still on three rails, "hello world" becomes:

HLODEORLWL

If you are going to break messages in this type of cipher then it is vital that you practice enciphering them first. Always start with simple messages and see what happens to them.

A message enciphered by any kind of transposition system (one that just moves letters around) will still have the same frequency distribution as the original plaintext.

Plaintext







Manipulated text