Rail Fence Cipher

Rail Fence Cipher

The Rail Fence Cipher (also called a zigzag 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 and diagonally on successive "rails" of an imaginary fence, then moving up when we reach the bottom rail. When we reach the top rail, the message is written downwards again until the whole plaintext is written out. 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 to get the ciphertext:

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

* [http://www.cryptogram.org/cdb/aca.info/aca.and.you/chapter_09.pdf#RAILFE American Cryptogram Association - Railfence]
* [http://www.simonsingh.net/The_Black_Chamber/railfence.html cipher online]


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • rail-fence cipher — noun : a zigzag transposition method in which alternate letters of the plaintext are juxtaposed (as in the encipherment bridge.bigrde) …   Useful english dictionary

  • Cifrado Rail Fence — El Cifrado Rail Fence es una forma de cifrado por permutación que ha tomado por la forma en que se codifican los textos con él. En el cifrado rail fence, el texto plano se escribe hacia abajo diagonalmente a través de sucesivos raíles de una… …   Wikipedia Español

  • Transposition cipher — In cryptography, a transposition cipher is a method of encryption by which the positions held by units of plaintext (which are commonly characters or groups of characters) are shifted according to a regular system, so that the ciphertext… …   Wikipedia

  • Substitution cipher — In cryptography, a substitution cipher is a method of encryption by which units of plaintext are replaced with ciphertext according to a regular system; the units may be single letters (the most common), pairs of letters, triplets of letters,… …   Wikipedia

  • Caesar cipher — The action of a Caesar cipher is to replace each plaintext letter with one fixed number of places down the alphabet. This example is with a shift of three, so that a B in the p …   Wikipedia

  • Classical cipher — A cipher is a means of concealing a message, where letters of the message are substituted or transposed for other letters, letter pairs, and sometimes for many letters. In cryptography, a classical cipher is a type of cipher that was used… …   Wikipedia

  • Book cipher — A book cipher is a cipher in which the key is some aspect of a book or other piece of text; books being common and widely available in modern times, users of book ciphers take the position that the details of the key is sufficiently well hidden… …   Wikipedia

  • Hill cipher — Hill s cipher machine, from figure 4 of the patent In classical cryptography, the 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… …   Wikipedia

  • Pigpen cipher — The pigpen cipher uses graphical symbols assigned according to a key similar to the above diagram.[1] The pigpen cipher (sometimes referred to as the masonic cipher, Freemason s cipher, Rosicrucian cipher, or Tic tac toe cipher) …   Wikipedia

  • Nihilist cipher — In the history of cryptography, the Nihilist cipher is a manually operated symmetric encryption cipher originally used by Russian Nihilists in the 1880s to organize terrorism against the czarist regime. The term is sometimes extended to several… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”