Brain Teasers Optical Illusions Puzzle Hunts Codes & Ciphers Mechanical Puzzles
Monoalphabetic
Polyalphabetic
Polygraphic
Transposition
Others

Codes and Ciphers :: Rail Fence

In the rail fence cipher, the plaintext is written downwards on successive "rails" of an imaginary fence, starting a new column when the bottom is reached. The message is then read off in rows. For example, if we have 3 rails and a message of "This is a secret message", you would write out:

T S A C T S G
H I S R M S E
I S E E E A J

The last J is just a random letter to fill in the space. The secret message is then condensed and regrouped.

TSACT SGHIS RMSEI SEEEA JGURL

To decipher a message you must know the number of rails that were used to encipher it. You then break up the letters into equal groups for each rail. For example, if you are using 3 rails, you would break the secret message into 3 equal groups. Now you stack the groups on top of each other and read off the message vertically. If you get gibberish, then there are probably some extra letters tacked on the end of the message that are throwing off the grouping. Try removing one letter from the end and try again.


Rail Fence Encoder / Decoder

Number of rails:

Plaintext
Ciphertext

 


Source: Wikipedia


Table of Contents
Books about Cryptography

   


Online Now
13 users and 652 guests

Users In Chat
autumn
Follow Braingle!
Tap into all 20,000+ of our brain teasers, riddles and puzzles on your iPhone or iPad.
Braingle in the iTunes App Store
Copyright © 1999-2017 | FAQ | Widgets | Links | Green | Subscribe | Contact | Privacy | Conditions | Advertise | Braingle Time: 12:32 pm
Sign In Create a free account