The Caeser Cipher
This article will be outlining what the Caeser Cipher is and how to encrypt/decrypt using the Caeser Cipher tool from Github.
What is the Caeser Cipher?
The Caesar cypher is known as one of the earlier and simplest cyphers. It is a type of substitution cypher in which each letter in the plaintext is ‘shifted’ a number of places across the alphabet.
Let’s take a look at the following diagram:
This demonstrates how the “plaintext” letters can be manipulated by shifting each value so it is represented by a completely different letter.
When encrypting a message using this algorithm, a key is used to indicate the “shift”. In this case, we will use a key of 3.
Here, the message TREATY IMPOSSIBLE has been encrypted to something completely different.
Caeser Cipher Tool
I have created a lightweight tool that performs encryption and decryption using Caeser Cipher. Follow this link to view the repository:
Please note, I will be demonstrating this script on Linux - Parrot OS. To install the script to your local machine, execute the following command:
To run the script, simple execute this command:
┌─[[email protected]]─[~/caeser] └──╼ $python3 julius.py [SNIPPED] # Select menu item #  Encrypt  Decrypt  Quit Please enter your choice:
To encrypt a message, simply select the first menu item and enter the parameters.
You will be asked for the shift key, this will be the number of places you want your letters to be shifted across the alphabet. It must be in the range -26 to +26.
Then enter your desired message you want to encrypt.
Please enter your choice: 1 [*] Shift key (-26 - 26): 15 [*] Message: Hello friend [+] wtaad ugxtcs
We have our cypher text: wtaad ugxtcs
To decrypt a message, select the second menu item and enter in your ciphertext.
We will be using the ciphertext: wtaad ugxtcs
Please enter your choice: 2 [*] The longer the cypher, the more accurate the results [*] Enter cypher: wtaad ugxtcs ## Most likely messages ## [+] ebiil cofbka [+] hello friend [+] khoor iulhqg [+] qnuux oarnwm
The script has returned a selection of the more likely plaintext by brute-forcing and analysing the words.
As we can see, our original plaintext has been identified:
[+] hello friend