October 2019
Beginner to intermediate
498 pages
14h 13m
English
One of the programming problems in the Codes and Other Secrets chapter was to write a generalized version of the transposition cipher called the rail fence cipher. In that chapter, we used a two-rail fence with the odd and even characters placed into separate rails. In this section we will look at a brute-force technique to break this cipher. Let’s begin by reviewing the procedure for the rail fence.
The key to the rail fence cipher is the number of rails used. When you know the number of rails, you encrypt the message by filling the rails top to bottom and left to right. For example, let’s suppose we want to encrypt the message “new ipad coming tomorrow” using three rails.
Once we have constructed the rails, ...
Read now
Unlock full access