Rail Fence Cipher

Information about Rail Fence Cipher

The Rail Fence Cipher is a form of transposition cipher that derives its name from the way in which it is encoded. In the rail fence cipher, the plaintext is written downwards on successive "rails" of an imaginary fence, then moving up when we get to the bottom. The message is then read off in rows. For example, if we have 3 "rails" and a message of 'WE ARE DISCOVERED. FLEE AT ONCE', the cipherer writes out: W . . . E . . . C . . . R . . . L . . . T . . . E . E . R . D . S . O . E . E . F . E . A . O . C . . . A . . . I . . . V . . . D . . . E . . . N . .

Then reads off:

WECRL TEERD SOEEF EAOCA IVDEN

(A number of websites have mistakenly referred to a row-first complete rectangular transposition as being the Rail Fence - this seems to be a recent innovation. All of the older references are consistent in applying Rail Fence to this down-and-up transposition.

Problems with the Rail Fence Cipher

The rail fence cipher is not very strong; the number of practical keys is small enough that a cryptanalyst can try them all by hand.

See also

  • Scytale
  • Helen Fouché Gaines, "Cryptanalysis, a study of ciphers and their solution", Dover, 1956, ISBN 0-486-20097-3

External Links

American Cryptogram Association - Railfence

In classical cryptography, a transposition cipher changes one character from the plaintext to another (to decrypt the reverse is done). That is, the order of the characters is changed.
..... Click the link for more information.
scytale (rhymes with Italy, and also transliterated as skytale, Greek σκυτάλη, a baton) is a tool used to perform a transposition cipher, consisting of a cylinder with a strip of leather wound around it on which is written a
..... Click the link for more information.
In cryptography, the ADFGVX cipher was a field cipher used by the German Army during World War I. ADFGVX was in fact an extension of an earlier cipher called ADFGX. Invented by Colonel Fritz Nebel and introduced in March 1918, the cipher was a fractionating transposition
..... Click the link for more information.
The Affine cipher is a special case of the more general substitution cipher. It is monoalphabetic and symmetric.

In affine ciphers the encryption function for a letter is where,
  • and are coprime (otherwise would have no multiplicative inverse modulo ).

..... Click the link for more information.
The Alberti Cipher was the first ever Polyalphabetic Cipher.

Created in the late 15th century, circa.1470, by Leon Battista Alberti, it was the peak of cryptography at that time.
..... Click the link for more information.
Atbash is a simple substitution cipher for the Hebrew alphabet. It consists of substituting aleph (the first letter) for tav (the last), beth (the second) for shin (one before last), and so on, reversing the alphabet.
..... Click the link for more information.
autokey cipher (also known as the autoclave cipher)[1] is a cipher which incorporates the message (the plaintext) into the key. There are two forms of autokey cipher: key autokey and text autokey ciphers.
..... Click the link for more information.
In classical cryptography, the bifid cipher is a cipher which combines the Polybius square with transposition, and uses fractionation to achieve diffusion. It was invented around 1901 by Felix Delastelle.
..... Click the link for more information.
A book cipher is a cipher in which the key is the identity of a book or other piece of text. It is generally essential that both correspondents not only have the same book, but the same edition.
..... Click the link for more information.
Caesar cipher, also known as a Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques.
..... Click the link for more information.
The Four-square cipher is a manual symmetric encryption technique. It was invented by famous French cryptographer Felix Delastelle.

The technique encrypts pairs of letters (digraphs
..... Click the link for more information.
Hill cipher is a polygraphic substitution cipher based on linear algebra. Invented by Lester S. Hill in 1929, it was the first polygraphic cipher in which it was practical (though barely) to operate on more than three symbols at once.
..... Click the link for more information.
A keyword is a monoalphabetic substitution. A keyword is thought of and then the letters of the alphabet are assigned a letter after the keyword has been decided. When the number of letters in the keyword has been assigned their encoded version, the rest of the alphabet is added to
..... Click the link for more information.
In the history of cryptography, the Nihilist cipher is a manually operated symmetric encryption cipher originally used by Russian Nihilists in the 1880s to organise terrorism against the czarist regime.
..... Click the link for more information.
In classical cryptography, a permutation cipher is a transposition cipher in which the key is a permutation.

To apply a cipher, a random permutation of size e is generated (the larger the value of e the more secure the cipher).
..... Click the link for more information.
pigpen cipher (sometimes called the masonic cipher or Freemason's cipher) is a simple substitution cipher exchanging letters for symbols based on a grid. The use of symbols is no impediment to cryptanalysis however, and cryptanalysis is identical to that of other
..... Click the link for more information.
Playfair cipher or Playfair square is a manual symmetric encryption technique and was the first literal digraph substitution cipher. The scheme was invented in 1854 by Charles Wheatstone, but bears the name of Lord Playfair who promoted the use of the cipher.
..... Click the link for more information.
A polyalphabetic cipher is any cipher based on substitution, using multiple substitution alphabets. The Vigenère cipher is probably the best-known example of a polyalphabetic cipher, though it is a simplified special case.
..... Click the link for more information.
In cryptography, the Polybius square, also known as the Polybius checkerboard, is a device invented by the Ancient Greek historian and scholar Polybius, described in Hist. X.45.6 ff.
..... Click the link for more information.
The Reihenschieber (German: Row Slider) was a hand cipher system used by Germany. It was developed during 1957 and used until the early 1960s, although information about the system was released publicly only in 1992. The system was used to encrypt high-grade messages.
..... Click the link for more information.
Reservehandverfahren (RHV) (German: Reserve Hand Procedure) was a German Naval World War II hand-cipher system used as a backup method when no working Enigma machine was available.[1]

The cipher had two stages: a transposition followed by bigram substitution.
..... Click the link for more information.
ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple Caesar cipher used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance.
..... Click the link for more information.
In classical cryptography, the running key cipher is a type of polyalphabetic substitution cipher in which a text, typically from a book, is used to provide a very long keystream.
..... Click the link for more information.
scytale (rhymes with Italy, and also transliterated as skytale, Greek σκυτάλη, a baton) is a tool used to perform a transposition cipher, consisting of a cylinder with a strip of leather wound around it on which is written a
..... Click the link for more information.
Smithy code is series of letters embedded, as a private amusement,[1] within the April 2006 approved judgement of Mr Justice Peter Smith on the The Da Vinci Code copyright case.
..... Click the link for more information.
The Solitaire cryptographic algorithm was designed by Bruce Schneier "to allow field agents to communicate securely without having to rely on electronics or having to carry incriminating tools",[1] at the request of Neal Stephenson for use in his novel
..... Click the link for more information.
In cryptography, a straddling checkerboard is a device for converting an alphabetic plaintext into digits whilst simultaneously achieving fractionation (a simple form of information diffusion) and homophony (a simple method for suppressing peaks of the frequency distribution).
..... Click the link for more information.
In cryptography, a substitution cipher is a method of encryption by which units of plaintext are substituted with ciphertext according to a regular system; the "units" may be single letters (the most common), pairs of letters, triplets of letters, mixtures of the above, and so
..... Click the link for more information.
The Tap Code is a cipher, commonly used by prisoners in jail to communicate with one another. The method of communicating is usually by "tapping" either the metal bars or the walls inside the cell, hence its name.
..... Click the link for more information.
In classical cryptography, a transposition cipher changes one character from the plaintext to another (to decrypt the reverse is done). That is, the order of the characters is changed.
..... Click the link for more information.

This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.