Privacy Canada is community-supported. We may earn a commission when make a purchase through one of our links. Learn more.
Atbash Cipher
Ciphers are basic algorithms that create encrypted messages through a specific series of steps. The atbash cipher is one well-known cipher that was historically used as a means to encrypt the Hebrew alphabet. However, the atbash cipher’s use extends well-beyond the Hebrew alphabet now.
As this encryption device is quite old and is well-known, it offers little to no security. The atbash cipher is what’s known as a substitution cipher. Essentially, one character in the original text is swapped for a different character.
Thus, the atbash cipher is not used in a professional sense as it is much too basic. Nonetheless, this cipher is a good idea to know as it provides an introduction to the most basic cryptography.
Atbash Cipher Algorithm
The most basic atbash cipher uses the alphabet to map letters to the opposite index. While the true atbash cipher has no key, modern interpretations may utilize it with a key. In the traditional atbash cipher, the alphabet is simply reversed to help create encrypted messages.
- A -> Z
- B -> Y
- C -> X
And so on!
If you wanted to encipher the message “foo bar”, all you have to do is find the “key” of the letters in the message to replace them.
Letters | Substitution Key |
---|---|
ABCDEFGHIJKLMNOPQRSTUVWXYZ | ZYXWVUTSRQPONMLKJIHGFEDCBA |
FOO BAR -> ULL YZI
Python and Atbash
To cipher a message using python, you can take advantage of the library pycipher.
Install the package using the following:
Pip install pycipher
To use the atbash cipher with python, you can use the following:
Ciphertext = Atbash().encipher(plaintext)
Where plaintext is the message that you want to be enciphered.
Cryptography uses with Atbash
As mentioned previously, the atbash cipher is not suitable for use in modern cryptography. Modern takes on the atbash cipher where a key is used to shift characters are no safer.
Just as the atbash cipher was at one point secure, today’s security may one day be outdated. With time, technology improves, security flaws are exposed, and more personal information is put on the web.
If you’re interested in cryptography and keeping your online information safe, check out this online privacy guide. In the guide, Privacy Canada shares the most important tips for keeping yourself safe in 2024.