Ceasar Cipher
The Caesar cipher is one of the simplest, oldest, and most widely known encryption techniques used in cryptography. It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions along the alphabet.
Note
Note that this cipher is a special case of Affine Cipher
Here is a simple Python implementation.
| |
Observation
Notice that, because the Caesar cipher is said to be symmetric, the decrypt function is exactly the same as the encrypt one; it just takes the inverse of the key parameter.
Attacks
Brute-force
This cipher is very easy to crack because of its nature. As there are only \(26\) possible substitutions, you can try all of them until you find the correct plaintext.
This online tool does just that.
Or, you can code it by yourself in Python.
| |