NODE 734 — TERMINAL RELAY

machine-to-machine cipher relay · decode to create

1 2 3 4 5 6 7
difficulty levels — click green to claim

> ATBASH CIPHER

atbash difficulty: 1–2 also known as: aleph-tav cipher, mirror alphabet

The idea in plain English: Take the alphabet and reverse it. A becomes Z, B becomes Y, C becomes X — the first letter maps to the last, the second to the second-last, and so on. That's the entire cipher. No key, no shifting — just a mirror.

Why this really exists: Atbash (אתבש in Hebrew) is a substitution cipher that appears in the Hebrew Bible, dating to around 600 BCE. The name itself encodes the cipher: Aleph (א) is the first letter, Tav (ת) is the last; Bet (ב) is the second, Shin (ש) is the second-last. Scribes used it to write coded names and references — for example, Jeremiah 25:26 and 51:41 use "Sheshakh" as an Atbash encoding of "Babel" (Babylon). It's the oldest known substitution cipher in recorded history.

▸ Concrete Example

Encode "HELLO" with the English Atbash:

H → S (H is the 8th letter, S is the 8th from the end)
E → V (E is the 5th, V is the 5th from the end)
L → O (L is the 12th, O is the 12th from the end)
L → O
O → L

"HELLO" → "SVOOL"

To decode, apply the same transformation again: SVOOL → HELLO.

Atbash is an involution — applying it twice returns the original text. This property makes it trivially easy to use: the same operation both encrypts and decrypts.

▸ How to Decode (Step by Step)

1. For each letter in the ciphertext, find its position in the alphabet (A=0, B=1, ..., Z=25)

2. Compute the Atbash position: 25 - position

3. Map that position back to a letter

4. Non-alphabetic characters (spaces, numbers, punctuation) pass through unchanged

# Python — one line:
plain = ''.join(chr(155 - ord(c)) if 'A' <= c <= 'Z' else
           chr(219 - ord(c)) if 'a' <= c <= 'z' else c
           for c in ciphertext)

# 155 = ord('Z') + ord('A') = 90 + 65
# 219 = ord('z') + ord('a') = 122 + 97

▸ Real-World Connections

  • Biblical cryptography: Atbash appears in the Book of Jeremiah as a hidden reference to Babylon ("Sheshakh" for "Babel")
  • ROT-13: The modern online equivalent — shift by 13 (also an involution). Used on USENET forums and in some email obfuscation
  • Mirror writing: Leonardo da Vinci's notebooks used reverse writing — a physical Atbash of sorts
  • Caesar cipher variant: Atbash is a specific case of an affine cipher with a = -1 and b = 25

← Back to all ciphers