Professional Documents
Culture Documents
Caesar Cipher
Caesar Cipher
Caesar Cipher is one of the most easiest and widely used technique for encryption
and decryption . It is also known by variety of names such as Shift Cipher , Caesar’s
Code . It is one of simplest type of substitution cipher technique.It is also a type of
mono alphabetic substitution cipher (i.e. same character is replaced with only one
other).
Caesar Cipher is named after Julius Caesar , who used it to protect the confidential
information of military significance with a shift of 3. In ancient times it was also used
to encrypt the names of Gods on the back of mezuzah with a shift of 1. The ideally
used value for shift is 3.
In Caesar Cipher , each character of the original message ( or plain text as known in
cryptography ) is replaced by the character corresponding to a fixed number of
positions shifted either up or down in the character.
Similarly in Caesar Cipher , when decrypting a message (or cipher text ) each
character is replaced with an inverse character shift i.e. the previous character .
The Caesar Cipher can also be expressed in another way which is in a more
mathematical form :
E = ( p + n ) mod 26
In simpler words , encryption of character p of the plain text is equal to a shift of p + n
, where n is the value for the number of characters to be shifted . The result is then
taken under modulo division i.e. , if the character is shifted past the end of the
alphabet , it goes back to the beginning.
Similarly , for decrypting the cipher text only the shift value is subtracted .
D = ( p - n ) mod 26
where p is the character of the cipher text.
Example :
C → 02 (02 + 3) mod 26 5 →F
I → 08 (08 + 3) mod 26 11 → L
P → 15 (15 + 3) mod 26 18 → S
H → 07 (07 + 3) mod 26 10 → K
E → 04 (04 + 3) mod 26 7 →H
R → 17 (17 + 3) mod 26 20 → U