Railfence and Redefence Cipher

Cryptologists have long contended that encipherment construction is one of the best ways to learn many idiosyncrasies of the various cipher types that will aid in the solving process.

This is well illustrated with the Railfence Cipher, a transposition cipher that came into being during the American Civil War. This cipher looks like an aerial view of a railfence. A simple illustration of the technique should help.

T   A   E   I   R   P   T   C   E

 H R I F N E S T A S O I I N I H R

E   L   C   A   N   S   O   P

In this example the plaintext is written in a zigzag pattern between the three rails (lines). We refer to this pattern as a three rail fence with no offsets. An offset refers to the number of rails excluded from the beginning of the cipher’s plaintext. (See rail examples four through seven on the next page.) The text begins at the top left in a cipher with no offsets. The ciphertext is taken off in groups of five horizontally across the “fence” top to bottom and written in groups of five letters: TAEIR  PTCEH  RIFNE  STASO  IINIH  RELCA  NSOP.

ACA practice limits the number of rails used to three through seven rails.

It is the variation of rails and offsets that creates the complexity and challenge of this cipher type. A crib aids the process of evaluating the variations of rails and offsets but trial, error, and a good eraser are invaluable tools towards the solution.

However, this trial and error process makes us intimately familiar with the construction routine and is the very process that has aided computer-oriented members to work at the development of programs that produce solutions in the blink of an eye. It behooves us to work to learn the intricacies of the Railfence system to attain such a level of understanding.

The development of Railfence cons for the Cm is a good place to begin. As you increase the difficulty through rail and offset variations you will gain an expertise in the recognition of these variables when solving.

A good tool that helps with the trial and error determination of the correct number of rails and offsets is a Railfence template. (Appendix IV.)

Three through Seven Rail Types. Ciphertext read horizontally, plaintext is zigzag.

Three Rails, No Offsets

P     n         t         h        f        t
 l   i  t   x   w   t    n   o    f   e    s
   a      e        I          o        s 

Four

__           k           s              e           n           f           f
  A       n   f       t   p          r   p       e   t       o   f       o  o
    b   a       i   s       a    e         r   s       s   n       s   t       n
      l           r            c             e           a           e           e

Five

__                n               i               e
 __         a   k          s   s           s   t
    T        l       s       e       a       f       o       o
      w    b           p   c           n   f           f   w
        o                a               o               t

 

Six

__                   a                   q                   e
 __              l   n               e   u               s   t
   __          b      k           s       a           f       t
      T       e           s       e           l       f           h
        h   e              p   c         a   o               r   e
    r                   a                   n                   e

Seven (No offsets)

A                       I                       h                       a
C                   t   o                   t   r                   r   i
A             c       n               m       e               n       l
   C           u           s           o           e           e           s
     o       r               a       r               t       v
       n   t                   r   f                   o   e
           s                       e                       s 

RFC-1. Railfence. Paper & Pencil. (error)                                     LIONEL

(4 rails, you determine the offsets.)

RNLSL  CSROL  RSSEA  ECOUN  OIFEI  RRIET  FAARO  RUSPP  NPIST 

OFAEC  PEEUA  OTINE  ROCEA  DLIRN  HQLRD  FC.

Post the ciphertext along the horizontal template rows (See Appendix IV) until the crib “error” is observed in a zigzag diagonal position. Offsets are involved in this cipher so you will have to experiment with a varying number of offset blank spaces in the first diagonal line.

RFC-2. Railfence. Use a template. (cipher)               LIONEL

FIEAT  WESOA  LHRSG  NATOS  TTIUR  CPMSE  OISOF  SHRIE  CNF.

See Appendix IV For the Railfence Solving Template.

Redefence Cipher

 The same solving principles used to decipher the Railfence Cipher can be put to use for the solving of the Redefence Cipher with one slight twist. The Redefence Cipher construction mixes the fence rows to increase the complexity of the solving procedure. (There go those devious encipherers again attempting to stay one step ahead of the innocent cryptanalysts.)

We will follow the procedure to solve the Redefence Cipher in the MA 2012 Cryptogram issue with four rails, no offsets used in the construction, in a rail order of 3, 2, 4, 1.

MA2012  E-12  Redefence.  Tranquility.    MARSHEN

LIEOH  TMTOA  EFRSL  ANASH  UTIEI  DLSIA  

TUROM  SAPFL  EHYCT  LSELN FM.

There are fifty-two letters in the cipher construction. Count off fifty-two spaces in a zig zag path for a four rail cipher in the Railfence Template located in Appendix IV. Post the ciphertext letters horizontally in these four rails, beginning with the spaces in rail three and continuing with rails 2, 4 and 1, in this order. The cipher construction will reveal a plaintext solution in the following zig zag arrangement.

C        t           l           s           e           l           n           f           m
a     s   h       u   t       i   e       i   d       l   s       i   a      t   u       r   o
 l  i       e   o       h   t       m   t       o   a       e   f       r   s      l   a       n
  m           s           a           p           f           l           e          h          y

Just a bit more complex than the Railfence Cipher, the Redefence Cipher requires much trial and error to test the posting of the ciphertext letters in all possible rail sequence combinations. Become familiar with the process and those with computer programming aptitude can join the ranks of other ACA computer solvers in the development of a program which will generate a solution in the “blink of an eye.” (RISHU)

We will provide the number of rails and offsets in the following Redefence Ciphers to allow you to become familiar with the solving process as you “cut your teeth” on this cipher type.

SO 2012, E-11. Redefence. Oral Output. Four rails, one offset.   (more)          APEX DX

FEALS  ADNDN  MRISI  TADNA  RIIDE  EAHOT  LSAOO  SDNE.

MA 2011, E-8. Redefence. Divine right. Five rails, two offsets. (were)   RIG R MORTIS

UAYAC  TWRDS  NCVNO  GIHDO  SGWRH  POSTH  VRTES  EAOAD  ERTON  FROSE  SEGAA  AEFON  TSAEI  DSET.