Understanding the Caesar Cipher: A Historical Encryption Method

Maitri Hingu
3 min readNov 1, 2023

--

Caesar Cipher: Is it related to Julius Caesar? 🤔

The Caesar cipher is indeed related to Julius Caesar, the Roman military and political leader. The Caesar cipher is named after him because it is believed to have been used by Julius Caesar to secure his private communications.

Let’s See How it Works.

The Caesar cipher is a straightforward substitution cipher that operates by rearranging the alphabetic letters by a predetermined quantity of positions. As an illustration, ‘A’ would be substituted for ‘D,’ ‘B’ would be replaced with ‘E,’ and so forth, if Julius Caesar utilised a shift of 3. The content of his intercepted messages became challenging to decipher in the absence of knowledge of the precise shift value.

Among the earliest known encryption methods, the Caesar cipher is classified as a symmetric key cipher. Although not deemed secure in the context of contemporary cryptographic principles, it does provide a historical illustration of the implementation of encryption during antiquity.

Let’s understand it using Example:

Plain Text: “HELLO WORLD”

Key: +4

Encryption Procedure:

Manual Process: Find 4th Character further than the given character in Alphabets.

According to your “Key” first create plain text and cipher text key = value pairs like below.

So according to that ‘H’ will become ‘K’, ‘E’ will become ‘H’, ‘L’ will become ‘O’, ‘O’ will become ‘R’. Space will stay as it is. Now ‘W’ will become ‘Z’, ‘R’ will become ‘U’, ‘D’ will become ‘G’.

Mathematical Process: First assign numbers to each letters as shown below.

Now You can perform Encrypt/Decrypt Function to it.

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

P = D(C) = (C — K) mod (26)

Computerised Process: If you are creating code for it, use ASCII values and then add it or subtract it according to your need. If you get ASCII value more than last alphabet ‘Z’ then subtract obtain ASCII from the last alphabet ASCII and then add the remaining in ASCII of ‘A’. In short go in circular way. As shown in below image.

Two Circles. One bigger and another smaller. Both has Alphabets written on their edge and put smaller circle on the bigger one so we can move it in clockwise as well as anti-clockwise for Encryption and Decryption.
Caesar Cipher

Cipher Text: So final Cipher Text for “HELLO WORLD” will be “KHOOR ZRUOG”.

Decryption Procedure: It is very Simple. If you are going Clockwise then go Anti-Clockwise for Decryption in circular motion method and vice-versa.

Let me give you one exercise for this. I will give you Cipher Text and Try to find Plain Text for it.

Cipher Text: “GCUA VQ DTGCM”

--

--

Maitri Hingu

Research Scholar & Assistant Professor in Department of ICT at Veer Narmad South Gujarat University, Surat.