Atbash Cipher

A simple substitution cipher where the alphabet is reversed.

πŸ›οΈ Historical Background of the Atbash Cipher

The Atbash Cipher is one of the oldest known encryption systems, originating from the ancient Hebrews. It is a form of monoalphabetic substitution cipher where the letters of the alphabet are reversed.

In this cipher, the first letter of the alphabet is replaced with the last, the second with the second-last, and so on. A becomes Z, B becomes Y, C becomes X, and so forth.

The name "Atbash" is derived from the first, last, second, and second-last letters of the Hebrew alphabet: Aleph-Tav-Beth-Shin. It was used in biblical times, primarily for hiding sensitive religious or political content.

β€œIt is a form of code that conceals messages through clever reversal.”

This cipher’s simplicity made it ideal for simple enciphering, especially in texts where deeper symbolic meaning was often as important as secrecy.

🧠 Fun Fact: The Atbash Cipher was used in the Book of Jeremiah to disguise the name "Babylon" as "Sheshach"!

πŸ” Atbash Cipher Principle

The Atbash Cipher is a type of monoalphabetic substitution cipher where each letter in the plaintext is replaced with its "mirror" in the alphabet. There is no shift or key involved.

This is how the substitution works:

Original 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
Reversed Alphabet: 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

Examples:

  • A β†’ Z
  • B β†’ Y
  • C β†’ X
  • M β†’ N
  • Z β†’ A

Key Characteristics:

  • No Key Needed: The cipher has a fixed substitution pattern, making it deterministic and easy to compute.
  • Perfect Reversibility: Encryption and decryption follow the same rule. Applying the cipher twice restores the original text.

Mathematical Representation:

In the Atbash Cipher, each letter is substituted with its mirror opposite in the alphabet.

Encrypted (or Decrypted) = 25 - Position of Letter

Example:

  • A = 0 β†’ 25 - 0 = 25 β†’ Z
  • M = 12 β†’ 25 - 12 = 13 β†’ N
  • Z = 25 β†’ 25 - 25 = 0 β†’ A

Where:

  • Position: A = 0, B = 1, ..., Z = 25
  • Encrypted or Decrypted: Letter at index (25 - original index)
πŸŒ€ Encryption = Decryption: The Atbash Cipher is perfectly symmetrical! That means applying the cipher twice brings you back to the original text.
πŸ’‘ Did You Know? The Atbash Cipher doesn't require a key, its mirror rule stays the same no matter the message!

✏️ Step-by-Step Guidance to Atbash Cipher

πŸ” Atbash Cipher Encryption

Step 1: Write Down the Plaintext

The plaintext is the original message you want to encrypt. This may include letters, spaces, and punctuation. Only alphabetic characters are encrypted.

Example:
Plaintext = HELLO WORLD

Step 2: Substitute Each Letter With Its Reverse
                    H (position 7)  β†’ 25 βˆ’ 7  = 18 β†’ S
                    E (position 4)  β†’ 25 βˆ’ 4  = 21 β†’ V
                    L (position 11) β†’ 25 βˆ’ 11 = 14 β†’ O
                    L (position 11) β†’ 25 βˆ’ 11 = 14 β†’ O
                    O (position 14) β†’ 25 βˆ’ 14 = 11 β†’ L

                    W (position 22) β†’ 25 βˆ’ 22 = 3  β†’ D
                    O (position 14) β†’ 25 βˆ’ 14 = 11 β†’ L
                    R (position 17) β†’ 25 βˆ’ 17 = 8  β†’ I
                    L (position 11) β†’ 25 βˆ’ 11 = 14 β†’ O
                    D (position 3)  β†’ 25 βˆ’ 3  = 22 β†’ W

                πŸ” Encrypted Text: SVOOL DLIOW
                

πŸ”“ Atbash Cipher Decryption

Step 1: Use the Same Reverse Rule

Since encryption and decryption follow the same logic, just apply the cipher again to the ciphertext.

Step 2: Write Down the Ciphertext

Example:
Ciphertext = SVOOL DLIOW

Step 3: Substitute Letters Back Using the Reversed Alphabet
                    S (position 18) β†’ 25 βˆ’ 18 =7 β†’ H
                    V (position 21) β†’ 25 βˆ’ 21 =4 β†’ E
                    O (position 14) β†’ 25 βˆ’ 14 =11 β†’ L
                    O (position 14) β†’ 25 βˆ’ 14 =11 β†’ L
                    L (position 11) β†’ 25 βˆ’ 11 =14 β†’ O

                    D (position 3) β†’ 25 βˆ’ 3 = 22 β†’ W
                    L (position 11) β†’ 25βˆ’ 11 = 14 β†’ O
                    I (position 8) β†’ 25 βˆ’ 8 = 17 β†’ R
                    O (position 14) β†’ 25 βˆ’14 = 11 β†’ L
                    W (position 22) β†’ 25 βˆ’22 = 3 β†’ D

                πŸ”“ Decrypted Text: HELLO WORLD
                

Note: Spaces and punctuation are not affected by the cipher.

Atbash Cipher Quiz

Hint:
  • The Atbash Cipher is a substitution cipher where the alphabet is reversed.
  • A becomes Z, B becomes Y, C becomes X, and so on.

Result:

Score: 0

πŸ“š Additional Resources

No additional resources available for this cipher.