Rail-fence Cipher

933 4 1
                                    

WARNING!:UNEDITED!

The railfence cipher is a very simple, easy to crack cipher. It is a transposition cipher that follows a simple rule for mixing up the characters in the plaintext to form the ciphertext. The railfence cipher offers essentially no communication security, and it will be shown that it can be easily broken even by hand.

Although weak on its own, it can be combined with other ciphers, such as a substitution cipher, the combination of which is more difficult to break than either cipher on it's own.

Many websites claim that the rail-fence cipher is a simpler "write down the columns, read along the rows" cipher. This is equivalent to using an un-keyed columnar transposition cipher.

Example §
The key for the railfence cipher is just the number of rails. To encrypt a piece of text, e.g.

defend the east wall of the castle
We write it out in a special way on a number of rails (the key here is 3)

d . . . n . . . e . . . . . .t . . . l . . .. . h . . . s . . .
. e . e . d . h . e .  .s . w . l . o . t . e . a . t . e
. . f . . . t . . . . . a . . . a . . . . . f . . . c . . . l .
The ciphertext is read off along the rows:

dnetlhseedheswloteateftaafcl
With a key of 4:

d . . . . . t . . . . . t . . . . . f . . . . . s . . .
. e . . . d . h . . . s . w . . . o . t . . . a . t . .
. . f . n . . . e . a . . . a . l . . . h . c . . . l .
. . . e . . . . . e . . . . . l . . . . . e . . . . . e
The ciphertext is again read off along the rows:

dttfsedhswotatfneaalhcleelee

                                          Pinky_Dust

Codes And ChipersTahanan ng mga kuwento. Tumuklas ngayon