You are on page 1of 2

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 :

1. Plain text - CAESAR CIPHER , Key (shift) - 3

Applying the encryption formula :

Plain text E Cipher text


C → 02 (02 + 3) mod 26 5 →F
A → 00 (00 + 3) mod 26 3 →D
E → 04 (04 + 3) mod 26 7 →H
S → 18 (18 + 3) mod 26 21 → V
A → 00 (00 + 3) mod 26 3 →D
R → 17 (17 + 3) mod 26 20 → U

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

The encrypted message is : “FDHVDU FLSKHU” .


Advantages of Caesar Cipher :
As far as the benefits of Caesar Cipher are considers , there are a few of them as :

1. It is the easiest method of cryptography .


2. In the entire process , only a key is used.
3. It is the best method for encryption , if complex coding techniques are not
considered.

Disadvantages of Caesar Cipher :


As indecipherable as the resulting cipher text may appear , Caesar Cipher as many
weaknesses as :

1. It is easy to break or hack .


2. It has a very small key space which means one can easily decrypt the cipher text
by trying all possible combinations without even knowing the key value i.e. by
performing brute force attack.
3. It is vulnerable to frequency analysis as the structure of the plain text remains
intact.
4. It offers no communication security.

You might also like