Atbash

Atbash is a naive cypher for encrypting and decrypting a message by substituting each letter in the message with their reverse letter in an alphabet. The beauty of it is its simplicity, anyone can easily understand and use it.

To encrypt with atbash the only thing we need is an alphabet or a bit more formal.

  • A set of characters
  • In a defined order

Each character needs to be unique otherwise it is not possible to encode and decode the message in a deterministic way. Consider for example if we had the alphabet A B A C B D and the letters A and B, since both of them appear more than ones in the alphabet it is not possible to know which position of the letter we’re referring to. This is why it is important that each letter is unique.
The order of the alphabet is also important, since the first character maps to the last character, the second character maps to the second to last character, etc.. If we don’t care about the order the encryption and decryption won’t match up. Thus we need to either create an alphabet or use an alphabet which fulfils both of these rules.
As our luck would have it the Latin Alphabet fulfils both of these criteria (unique and ordered). It is of course possible to define your own alphabet by adding characters, changing the order of the characters or by removing any of the characters.

Example

If we have an alphabet with only upper-case letters we would end up with the following alphabet and reversed alphabet.
Alphabet A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Reveres Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

To encrypt a message we would simply look at each letter in the alphabet and then replace it with the letter in the same position of the reversed alphabet, for example, A becomes Z, B becomes Y, C becomes X, etc..
To decrypt the message the reverse is applied.

Let’s encrypt the following message HELLO WORLD which then becomes SVOOL DLIOW. To decrypt it we would then do the same procedure but this time starting from the reverse and finding letters at the same position in the alphabet.

Message HELLO WORLD
Reversed SVOOL DLIOW

Limitations

There are some limitations to keep in mind when using Atbash. First of all, all the characters we want encrypt and have in the message needs to be part of the alphabet. This means that if we want to encrypt punctuation and numbers we need to make it part of the alphabet. If, however, we’re not interested in encrypting these characters they an be excluded from the alphabet.
Furthermore it is not a very safe encryption method since each encrypted letter only has as many possible encryptions as the number of characters in the alphabet minus one, since one character won’t map to itself. Given a big enough sample of an encrypted message the chance of every letter used in the alphabet increases. From there some usual methods of looking at how often characters appear and in what context can be used to decrypt the message.

Final Words

Atbash is has a beautiful simplicity to it. It can easily be understood and implemented. It is so simple that you most likely could use it when writing a message by hand. It is not to be considered to be a safe way of sending sensitive information but a fun thing to use. It will if nothing less leave the people who are not aware of it confused for a short while.