Route Cipher

Route Cipher

In a route cipher the plaintext is written into a rectangular grid of particular dimensions. The plaintext message is written starting in the top left corner and written down the first column until it is filled, then from the top of the second column until it is filled, and so on until the grid is filled. If the number of letters in the plaintext message is insufficient to fill the grid, you can use use junk symbols sometimes called nulls to help fill the grid completely. Usually letters such as Q or J are used as nulls since they aren't frequently used and will clearly stand out from the actual message.

For example:

plaintext: a rose by any other name would smell as sweet

Grid:  A E N H A O S L W
       R B Y E M U M A E
       O Y O R E L E S E
       S A T N W D L S T

key: spiral inwards, clockwise, starting from the top right


Route ciphers have many more keys than the railfence, as it consists of the dimensions of the grid, starting point of the route, and then the path of the route itself, in theory making route ciphers more secure than railfence ciphers. However, poorly chosen routes can leave portions of your plaintext exposed in the ciphertext, so proper key selection is critical to maintain security of the message.