Appendix IV – RAILFENCE TEMPLATE

It would be foolhardy to label either pencil and paper or computer solving techniques as the “proper approach” for solving any cipher. They are inter-related and have a bond between them. Pencil and paper solving is the learning foundation for cryptography, and cryptographic computer programming and computer programs have much to offer pencil and paper enthusiasts in alternative routes of solving routines and the elimination of much of the grunt work and drudgery of trial and error erasures.

The Rail Fence Cipher was a popular American Civil War cipher. For some people, the construction process is the very best route of learning the idiosyncrasies of cipher types as an aid to the decipherment process. This template was developed to allow one to reverse the process of zig zag plaintext generating ciphertext rows. The template will be an aid to all wishing to encipher plaintext messages and also deciphering Rail Fence ciphers. It should be noted that this same template can be used to encipher and solve those dreaded Redefence ciphers as well.

The template can be enlarged on a copy machine to any workable size for the user. There are patterns for Rail Fences ranging from 3 to 7 rows (rails) and space for over 60 letters. If more letters are required, tape two templates together at an appropriate place. Be sure to make copies of your enlarged copy which can be used for future Rail Fence ciphers.

Simply post the ciphertext letters to the horizontal spaces for desired number of rails and look for readable plaintext in the zig zag pattern spaces. Use only the number of spaces, counting from left to right in a zig zag path, which equals the number of letters in the cipher construction. Offsets are observed by leaving blank the number of spaces on the left hand side of the template to equal the number of offsets required. As spaces are skipped on the left hand side of the template they should be added to the right until the spaces used equal the number of ciphertext letters in the construction.

Rails Ciphertext Letters

3 —       —       —       —       —       —       —       —       —       —
    —   —   —   —   —   —   —   —   —   —   —   —   —   —   —   —   —   —   — 
      —       —       —       —       —       —       —       —       —       —

4 —           —           —           —           —           —           —
    —       —   —       —   —       —   —       —   —       —   —       —   —
      —   —       —   —       —   —       —   —       —   —       —   —       —
        —           —           —           —           —           —           —

5 —               —               —               —               —               —
    —           —   —           —   —           —   —           —   —           —
      —       —       —       —       —       —       —       —       —       —
        —   —           —   —           —   —           —   —           —   —
          —               —               —               —               — 

6 —                   —                   —                   —                   —
    —               —   —               —   —               —   —               —
      —           —       —           —       —           —       —           —
        —       —           —       —           —       —           —       —
          —   —               —   —               —   —               —   —
            —                   —                   —                   —

7 —                       —                       —                       —
    —                   —   —                   —   —                   —   —
      —               —       —               —       —               —       —
        —           —           —           —           —           —           —
          —       —               —       —               —       —               —
            —   —                   —   —                   —   —                   —
              —                       —                       —

Special Note: Construction of the Railfence cipher will demonstrate that offset blank spaces at the start of the cipher are added to its end.

Use only the number of spaces that equal the ciphertext letters in the construction. Count off 52 spaces for a 52 letter construction, zig zag path, from left to right on the template.