top of page
Search
  • Writer's picturetabletopescapes

Rail Fence Ciphers

Updated: Dec 14, 2023

white country fence with 3 rails

In the world of encoding messages, many methods have been used throughout history, ranging from simple transposition ciphers to complex multi-letter substitution ciphers. In today's blog, we will look at the rail fence cipher.


This is an easy way to encode a message quickly, and while it isn't sophisticated it might be enough for your purposes. To develop the cipher, the message you want to encode, the plaintext, is written in an up-and-down zig-zag pattern:

rail fence cipher encoding technique

The cipher text is written out in all, capital letters, taking each line from the pattern:

		MMMIONETETINGTNIET

The cipher text is then spaced out in groups of 4 letters:

		MMMI ONET ETIN GTNI ETEA DHPS

You can end the encoding here, or you can use a keyword for added security. For example, using the keyword Monday, you would rearrange the cipher text groupings alphabetically according to your keyword. The new cipher text would then be:

		ETEA GTNI MMMI ETIN ONET DHPS

To decode the message the recipient would reverse the process. As the receiver who knows the keyword, you start with admnoy (Monday, in alphabetical order), and rearrange the groupings. After you have the cyphertext in the correct order you can split it up and arrange it by the 3 rails used to encode it. Notice the pattern length of 6, 12, and 6 when the message is written out in rails.


In the example above we used 3 rails in our encoding process. You can use any number of rails when you encode your message. Always ensure your keyword has no repeated letters. Take a shot at decoding the message below using the keyword turkeys and 4 rails.

		WYAI BOKY TPSO AREN MUOC LAOR VRWE

Good luck.



15 views0 comments

Recent Posts

See All

Ciphers & Codes

Join us on our blog as we explore and discuss a variety of ciphers you might encounter on your escape room adventures. We'll break down how the cipher is created and subsequently decoded. Finaly, ea

תגובות


bottom of page