Friday, October 1, 2021

Caesar cipher in network security | Caesar cipher explain with example | Shift Cipher | How caesar cipher works?

     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.

 

Caesar cipher

Caesar cipher is type of substitution cipher. This technique was found by Julius Caesar. This technique is very simple and easy to generate cipher of given plain text. This technique is also known as shift cipher. In Caesar cipher techniques each letter/alphabet is replaced by the letter/alphabet which is three place next to the letter which is to be substituted. (Three place next to the letter method was used by Julius Caesar.)

Algorithm:

Step-1: The encryption can also be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, a = 0, b= 1, ..., z = 25. Encryption of a letter (C) by a shift (E)can be described mathematically.

Generalise equation of Caesar cipher (Encryption & Decryption):

C = E (K, P) = (P + K) mod 26

P = D (K, C) = (C – K) mod 26

Where, C = Ciphertext, P = Plain Text, E = Encryption, D = Decryption, K = Key.

 

Step-2: The transformation can be represented by aligning two alphabets; the cipher alphabet is the plain alphabet shift left or right by some number of positions. For instance, here is a Caesar cipher using a shifted of three places. (Here key is 3).



Step-3: When decrypting, a person looks up each letter of the   cipher text in the and writes down the corresponding letter in the “plaintext" line (Key = 4). Deciphering is done in reverse, with a right shift of 4.


To learn more about Caesar Cipher, Click here

    Watch more videos click here.

No comments:

Post a Comment