The Caesar cipher is a simple and classic encryption technique that shifts the letters of the alphabet by a fixed amount.
To illustrate the process, let's consider an example where the shift is 3:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
The original alphabet
DEFGHIJKLMNOPQRSTUVWXYZABC
The alphabet shifted by 3 positions
For each letter in the plaintext, it is replaced by the letter that is a fixed number of positions down the alphabet.
Example of encrypting "HELLO" with a shift of 3.
Credit for Image.This simple algorithm provides a basic level of security, but it's easily breakable due to its predictability. Despite its limitations, it serves as a foundation for more complex encryption methods.
The decipherer uses fitness functions to evaluate the likelihood of a particular shift. One common fitness function involves comparing the frequency of letters in the ciphertext with the expected frequency of letters in the English language.
(relative) English letter frequencies, found using a frequency analysis script I ran on a piece of long text I found online.
The fitness function assigns higher scores to shifts that result in a distribution of letters similar to the expected frequencies in English. The decipherer then selects the shift with the highest score as the likely encryption key.