Introduction
There are
basically two types of symmetric cipher: Substitution Cipher, Transposition
Cipher.
Substitution
Cipher: A substitution is a technique in which each letter or bit of
the plaintext is substituted or replaced by some other letter, number or symbol
to produce cipher text. For Example, ABC ⟹ XYZ.
Types of
Substitution Cipher: Caesar Cipher, Monoalphabetic Cipher, Vigenère
Cipher, Playfair Cipher, One time pad cipher (Vernam cipher), Hill Cipher.
Transposition
Cipher: In transposition technique, there is no replacement of
alphabets or numbers occurs instead their positions are changed or reordering
of position of plain text is done to produce cipher text. For Example,
ABCDE ⟹ BADEC.
Types of Transposition
Cipher: Rail Fence Cipher, Columnar Transposition Cipher.
Rail Fence Cipher/Zigzag Cipher
The rail
fence cipher (sometimes called zigzag cipher) is a transposition
cipher that jumbles up the order of the letters of a message using a basic
algorithm. It is one of the easy techniques of transposition cipher in which
position of letters are changed. The rail fence cipher works by writing your
message on alternate lines across the page, and then reading off each
line in turn. Note that all white spaces have been removed from the plain text.
Example – 1 (Depth/Key = 2)
Plaint
Text: SECRET MESSAGE (Depth/Key = 2)
To encode this message, we will first write over two lines (the “rails of the fence”) as follows:
The ciphertext is
then read off by writing the top row first, followed by the bottom row
Cipher
Text: S C E M S A E E R T E S G
Example – 2 (Depth/Key = 3)
Plaint
Text: SECRET MESSAGE (Depth/Key = 3)
To encode this message, we will first write over two lines (the “rails of the fence”) as follows:
The ciphertext is then read off by writing the top row first, followed by the bottom row.
Cipher Text: S E S E E R T E S G C M A
To learn more about Rail fence (Zigzag) cipher, Click here
No comments:
Post a Comment