The Railfence cipher – also called zig-zag or palisade cipher – is a transposition cipher.
The text is written in a defined depth (key) in zigzag.
For encryption, the text is written in lines one after the other. The order of the lines can be changed by an optional password. The order of the lines corresponds to the position of the letters of the password in the alphabet.