Fact-checked by Grok 2 weeks ago

Atbash

Atbash is a simple originally devised for the , in which each letter is replaced by its counterpart at the opposite end of the 22-letter sequence—thus, the first letter aleph (א) becomes the last tav (ת), the second bet (ב) becomes the penultimate shin (ש), and so on. This reversal creates a mirrored encoding that is straightforward to apply and decrypt, making it one of the earliest known . The cipher's origins trace back to ancient Hebrew scribal practices around 600–500 BCE, during the time of the Babylonian exile, when it served as a tool for concealing sensitive or sacred information amid political and religious persecution. It appears explicitly in the , particularly in the , where it encodes place names to symbolize divine inversion of power—such as "Sheshak" (ששך) for Bavel (Babylon, בבל) in Jeremiah 25:26 and 51:41, and "Leb Qamay" (לב קמי) for Kasdim (Chaldea, כשדים) in Jeremiah 51:1. These instances, recognized by Talmudic scholars and medieval commentators like , highlight atbash's role not only as but also as a literary device to underscore themes of retribution and reversal in prophetic texts. Beyond its biblical context, atbash influenced later cryptographic traditions, including adaptations for the (e.g., A to Z, B to Y), though its primary historical and cultural significance remains tied to Hebrew and . While rare in —appearing only a handful of times in the —its simplicity and symbolic depth made it a foundational example of early and techniques, later referenced in such as the ( 54a).

Core Concepts

Definition and Origins

A is a method of in which units of —typically individual letters—are replaced with other letters or symbols according to a fixed system, thereby obscuring the original message while preserving its structure. This approach contrasts with transposition ciphers, which rearrange the positions of letters without altering their identities, and forms the basis for many early cryptographic techniques due to its simplicity and reliance on a predefined . Atbash is a specific monoalphabetic that systematically reverses the order of an , mapping the first to the last, the second to the second-last, and so on. Developed for the , it exemplifies a fixed where the mapping remains constant throughout the text, requiring no variable beyond the inherent reversal rule. The name "Atbash" derives from the Hebrew letters (א, the first in the ) and tav (ת, the last), combined with (ב, the second) and (ש, the second-last), illustrating the cipher's core principle of pairing opposites. This underscores its origins in ancient Hebrew scribal traditions, where such reversals served symbolic as well as practical purposes in textual encoding. Unlike more flexible ciphers that allow arbitrary permutations, Atbash employs an involutory mapping—meaning the transformation is self-inverse, so applying the twice returns the original text, making and decryption identical processes. This fixed, reciprocal nature distinguishes it as a deterministic and straightforward variant within the broader category of monoalphabetic ciphers.

Encryption Mechanism

The Atbash operates as a monoalphabetic where each letter in the is replaced by its counterpart at the opposite end of the . For the 26-letter used in English, the mapping follows a reversal scheme: the first letter 'A' is substituted with 'Z', the second 'B' with 'Y', the third 'C' with 'X', and so on, up to 'M' with 'N' and vice versa, such that the position i (starting from 1 for 'A') maps to the letter at position $27 - i. To encrypt, one identifies the position of each letter and replaces it with the corresponding ciphertext letter according to this fixed mapping, preserving the original case if applicable (e.g., uppercase to uppercase). In its original Hebrew context, the Atbash cipher applies the same reversal principle to the 22-letter Hebrew alphabet, pairing letters from the beginning and end: the first letter Aleph (א) with Tav (ת), the second Bet (ב) with Shin (ש), and continuing through the middle where Lamed (ל) pairs with Kaf (כ). The full mapping is as follows:
PositionPlaintextNameCiphertextName
1אAlephתTav
2בBetשShin
3גGimelרResh
4דDaletקQof
5הHeצTzadi
6וVavפPe
7זZayinעAyin
8חChetסSamekh
9טTetנNun
10יYodמMem
11כKafלLamed
12לLamedכKaf
13מMemיYod
14נNunטTet
15סSamekhחChet
16עAyinזZayin
17פPeוVav
18צTzadiהHe
19קQofדDalet
20רReshגGimel
21שShinבBet
22תTavאAleph
proceeds by substituting each Hebrew letter in the with its mapped counterpart, typically ignoring or preserving diacritics if present in modern adaptations. A key mathematical property of the Atbash cipher is its involutory nature, meaning the E serves as its own , so that E(P) = E^{-1}(P) for any P, and applying the twice yields the original text: E(E(P)) = P. This arises because the substitution is a fixed-point-free (except possibly at the alphabet's center) that pairs elements in a way that composing the with itself results in the . Non-alphabetic characters, such as spaces, punctuation, and numbers, are typically left unchanged during to maintain and structure, while the processes only the alphabetic content. For instance, in the English phrase "", the encryption would transform "HELLO" to "SVOOL" by mapping H to S, E to V, L to O, and L to O, while leaving the space and "WORLD" processed separately as "DLIOW". The cipher adapts straightforwardly to alphabets of different lengths: the 26-letter Latin alphabet uses the full reversal as described, whereas the 22-letter Hebrew omits the four letters absent from the traditional Hebrew script (final forms like Kaf sofit are not standardly included), ensuring the pairing remains balanced without a central unpaired letter.

Historical Usage

Biblical References

The most prominent examples of Atbash in the Hebrew Bible appear in the Book of Jeremiah. The term "Sheshach" (ששך) in verses 25:26 and 51:41 is widely interpreted by scholars as an Atbash substitution for "Babel" (בבל), referring to Babylon. Another explicit example is "Leb Qamai" (לֵב קָמַי) in Jeremiah 51:1, an Atbash substitution for "Kasdim" (כַּשְׂדִּים, Chaldea), similarly recognized by commentators and the Targum. In this cipher, the first letter of the Hebrew alphabet, bet (ב), is replaced by shin (ש), the second bet (ב) by another shin (ש), and lamed (ל) by final kaf (ך), effectively inverting the positions within the 22-letter aleph-bet to encode the name of Israel's oppressor. Medieval Jewish commentators, including (1040–1105) and David Kimhi (c. 1160–1235), explicitly recognized "Sheshach" as an intentional Atbash device, viewing it as a cryptic for prophetic warnings against to avoid direct confrontation or to emphasize divine subtlety in judgment. The , an ancient translation, similarly renders "Sheshach" directly as "Babel," supporting this among early exegetes. Scholarly debate persists on whether the served primarily for secrecy during Babylon's dominance or as a literary tool to symbolize the reversal of imperial power, though no extrabiblical evidence confirms a historical place named Sheshach in Neo-Babylonian records. Linguistically, Atbash aligns well with writing systems like Hebrew, where the linear facilitates simple positional inversion without altering phonetic values, allowing seamless integration into prophetic while preserving metrical flow. This substitution exploits the structure of Hebrew, where consonants carry semantic weight, enabling "Sheshach" to function as a homophonic or stand-in that evokes concealment without disrupting for initiates. Beyond these instances, Atbash appears infrequently in biblical prophetic literature, likely as a deliberate tool for divine concealment or to underscore themes of inversion in power dynamics, such as God's overturning of earthly kingdoms. Two additional potential but debated cases occur within itself: in 18:2–4, "chomer" (חמר, "clay") may encode "sug" (סוג, "backslide") to highlight moral reversal in the potter ; and in 20:8, "kol-et" (כל-עת, "every time") could substitute for "yinnakem" (ינקם, "he will avenge") in the prophet's , emphasizing persistent . These examples, while not universally accepted, illustrate Atbash's role in enhancing thematic depth rather than exhaustive frequency.

Other Ancient Applications

The Atbash cipher emerged in ancient Jewish contexts around the 6th-5th century BCE, potentially influenced by the development of the from Phoenician scripts originating around the BCE. Scholars have identified parallels in substitution ciphers from , , and traditions, suggesting a broader cultural exchange in the that informed the Atbash method's emergence in Jewish contexts. In non-biblical Jewish texts, Atbash appears in Talmudic literature, notably in the Babylonian Talmud's tractate 52b, where the AṬBḤ —attributed to R. Hiyya—is employed as a hermeneutical device in a series of homilies to encode and decode scriptural interpretations. Some scholars, such as Hugh J. Schonfield, have proposed Atbash usage in the Dead Sea Scrolls, including the , to obscure references in sectarian writings from the 2nd century BCE–1st century CE, reflecting a possible role in esoteric communication among Second Temple Jewish communities. However, this interpretation remains speculative and is not widely accepted. These inscriptions and amulets from the site indicate practical applications in protective and interpretive artifacts, underscoring Atbash's integration into daily ritual and scholarly life at . Atbash played a significant cultural role in Kabbalistic traditions as a mystical tool intertwined with gematria and temurah (letter permutation), facilitating the revelation of hidden divine meanings in sacred texts from the medieval period onward. One detailed example from medieval Jewish mysticism appears in the works of the 13th-century Kabbalist Abraham Abulafia, who incorporated Atbash alongside gematria and notarikon to permute Hebrew letters in meditative practices, such as transforming the divine name "YHWH" through reversal to evoke prophetic visions and explore the sefirot's interconnections, thereby enhancing spiritual ascent. This application, derived from ancient rabbinic precedents, emphasized Atbash's utility in unveiling esoteric layers of Torah interpretation within Ashkenazic and Sephardic mystical circles.

Mathematical Properties

Relation to Affine Ciphers

The is a monoalphabetic that operates on the 26-letter by mapping each letter, represented numerically as x where A = 0, B = 1, ..., Z = 25, to a ciphertext value via the function E(x) = (a x + b) \mod 26, with integers a and b such that \gcd(a, 26) = 1 to permit decryption. Atbash constitutes a special case of this , employing the fixed parameters a \equiv -1 \pmod{26} (equivalently a = 25) and b = 25. Substituting these values yields the rule E(x) = (25 x + 25) \mod 26. This expression simplifies algebraically: since $25 \equiv -1 \pmod{26}, it follows that $25 x + 25 \equiv -x + 25 \pmod{26}, or equivalently E(x) = 25 - x \mod 26, which precisely reverses the alphabetical positions as in Atbash (e.g., A maps to Z, B to Y). To verify the equivalence, consider the step-by-step computation for sample inputs under both forms:
  • For x = 0 (A): $25 - 0 = 25 \mod 26 = 25 (Z); alternatively, $25 \cdot 0 + 25 = 25 \mod 26 = 25 (Z).
  • For x = 1 (B): $25 - 1 = 24 \mod 26 = 24 (Y); alternatively, $25 \cdot 1 + 25 = 50 \mod 26 = 24 (Y).
  • For x = 13 (N): $25 - 13 = 12 \mod 26 = 12 (M); alternatively, $25 \cdot 13 + 25 = 350 \mod 26 = 12 (M).
  • For x = 25 (Z): $25 - 25 = 0 \mod 26 = 0 (A); alternatively, $25 \cdot 25 + 25 = 650 \mod 26 = 0 (A).
This holds for all x \in \{0, 1, \dots, 25\}, confirming that Atbash's reversal mapping is identical to the output of the specified . The fixed choice of a = 25 and b = 25 renders Atbash a degenerate , lacking the variable key selection that characterizes the general form and thereby offering no flexibility in parameterization.

Key Characteristics and Limitations

One defining characteristic of the Atbash cipher is its involutory nature, whereby the encryption operation is identical to the decryption process, rendering the cipher self-inverse. This property arises because the reversal mapping pairs each letter with its counterpart in a symmetric manner, such that applying the substitution twice returns the original text. As a result, users need only memorize or reference a single alphabet reversal table, which streamlines manual encoding and decoding without requiring separate keys or inverse computations. From a perspective, Atbash exhibits extreme due to its fixed, non-secret , which provides no against basic cryptanalytic techniques. The preserves the frequency distribution of letters from to , making it susceptible to ; for example, in the English alphabet, the common letter (x=4) maps to (21 via 25 - 4), and the distribution's shape allows attackers to infer mappings rapidly from letter patterns. This flaw renders Atbash unsuitable for protecting sensitive communications, as even short messages can be broken with minimal effort using statistical methods. Practical limitations further constrain Atbash's applicability, particularly its dependency on alphabet size and structure. It functions optimally with even-length alphabets like the 22-letter Hebrew script, where letters divide evenly into pairs (e.g., with tav, with ) for straightforward reversal. For odd-sized alphabets, the middle letter maps to itself, maintaining the cipher's simplicity and reversibility without adjustments. However, languages incorporating diacritics and extended characters may require defining the full ordered , potentially complicating application. Despite these drawbacks, Atbash's primary strength lies in its unparalleled , requiring no complex tools or variable keys, which suits it for non-security-critical roles such as educational demonstrations of principles or esoteric practices like Kabbalistic temurah, where symbolic letter rearrangements hold interpretive value over cryptographic protection.

Examples and Modern Interpretations

Illustrative Examples

One common illustrative application of the Atbash is in puzzle-solving, where it transforms straightforward into enigmatic strings for recreational challenges. For instance, consider the "ATTACK AT DAWN." Applying the —where A becomes Z, B becomes Y, C becomes X, D becomes W, and so on, with spaces preserved—the encoded is "ZGGZXP ZG WZDM." To decode this back, reverse the process: Z reverts to A, G to T, G to T, Z to A, X to C, P to K for the first word, yielding "ATTACK"; similarly, ZG becomes "AT," and WZDM becomes "DAWN." This bidirectional makes Atbash ideal for such exercises, as the same mapping serves both encryption and decryption. For educational purposes, Atbash is often demonstrated through a direct mapping of the to its reverse, highlighting the cipher's straightforward substitution mechanism. The following table illustrates this pairing:
PlaintextABCDEFGHIJKLMNOPQRSTUVWXYZ
CiphertextZYXWVUTSRQPONMLKJIHGFEDCBA
This table underscores the cipher's , where the position of each from the start of the corresponds to its substitute from the end. To illustrate its original use with the , consider the greeting "" (שלום, meaning "peace"). In Atbash, (ש, 21st ) maps to (ב, 2nd), lamed (ל, 12th) to kaf (כ, 11th), vav (ו, 6th) to (פ, 17th), and (ם, 13th) to yod (י, 10th), resulting in "bet-kaf-pe-yod" (בכפי, transliterated as "b'kafi"). This example demonstrates the cipher's application to its native 22- . In creative exercises or , Atbash can be used to playfully reverse names or short phrases, fostering engagement without requiring complex tools. For example, the name "" encodes to "ZORXV," which participants might decode as a fun challenge in a setting or casual puzzle , demonstrating the 's accessibility for beginners. To show its adaptability beyond English, Atbash applies similarly to other alphabetic languages with comparable structures, such as Latin. Encoding the simple phrase "" (meaning "") yields "ZEV," where A substitutes to Z, V (the 22nd letter) to E (the 5th), and E to V, preserving the phrase's brevity while illustrating cross-linguistic potential.

Contemporary Relevance

In contemporary cryptography education, the Atbash cipher serves as an accessible entry point for introducing substitution ciphers and basic encryption concepts, particularly in secondary school curricula and online resources since the early 2000s. Educational materials often highlight its simplicity to illustrate historical cryptography without requiring advanced mathematical knowledge, making it suitable for teaching pattern recognition and algebraic thinking. For instance, a 2019 thesis on integrating classical ciphers into secondary mathematics education emphasizes Atbash as a tool for engaging students in modular arithmetic and substitution techniques. Similarly, resources like the "A Book on Classical Cryptography" dedicate units to Atbash, positioning it as a foundational example in self-study and classroom settings. The Atbash cipher has gained visibility in popular culture, notably through its appearance in Dan Brown's 2003 novel , where it deciphers the Hebrew term "Baphomet" into "Sophia," revealing clues tied to historical and religious mysteries. This usage popularized Atbash among general audiences, integrating it into puzzle-solving narratives that blend with fiction. In video games and interactive media, Atbash features in cryptogram challenges, such as those in the animated series (2012–2016), where it appears alongside other ciphers in end-credits puzzles and hidden messages, encouraging players to decode secrets within the game's lore. These portrayals underscore Atbash's role in fostering interest in through entertainment. Digital tools have made Atbash implementation straightforward, with libraries and online encoders emerging prominently in the to support educational and hobbyist applications. The open-source pycipher library, available since around 2013, includes built-in functions for encoding and decoding Atbash, enabling quick integration into programming projects. Online platforms like dCode and Cryptii offer free, browser-based Atbash converters that handle both Latin and Hebrew alphabets, facilitating instant experimentation without software installation. These resources reflect Atbash's enduring utility in demonstrating mechanics in computational contexts.

References

  1. [1]
    Answer
    The Atbash cipher is an ancient Hebrew cipher used in the scriptures at least three times (see references above), formed by replacing the first letter of the ...
  2. [2]
    CSCI 102T:: The Socio-Techno Web
    The first documented use of codes was by Hebrew scribes in approximately 500 - 600 B.C. The Atbash cipher specified that each letter in a message would be ...
  3. [3]
    None
    ### Summary of Atbash Cipher in "Atbash in Jeremiah and Its Literary Significance: Part 1" by Scott B. Noegel
  4. [4]
    8.4 Other Substitution Ciphers
    The Caesar cipher is an example of a substitution cipher, where one character is replaced by another. Other substitution ciphers use more complicated rules ...
  5. [5]
    Classical Ciphers
    Thus aleph (א) becomes tav (ת), bet (ב) becomes shin (ש), gimel (ג) becomes resh (ר). The name “Atbash” itself comes from this mapping: aleph–tav and bet–shin.
  6. [6]
    Atbash Cipher - Crypto Corner
    In the original Hebrew this means that 'aleph' is encrypted to 'tav', and 'beth' to 'shin'. This is where we get the name of the cipher 'atbash'. For the ...
  7. [7]
    What is the Atbash code? - Bible Hub
    It replaces each letter of the Hebrew script with its counterpart from the opposite end of the alphabet, effectively reversing the sequence of letters.
  8. [8]
    Implementing Atbash Cipher - GeeksforGeeks
    Jul 23, 2025 · Definition: Atbash cipher is a substitution cipher with just one specific key where all the letters are reversed that is A to Z and Z to A.
  9. [9]
    Atbash Cipher Algorithm - 101 Computing
    Jan 10, 2020 · The Atbash Cipher maps each letter of an alphabet it to its reverse, so that the first letter (e.g. A) becomes the last letter (e.g. Z), the ...Missing: inverse involutory
  10. [10]
    Hebrew Atbash - Ancient Hebrew Cipher & Historical Encryption
    Hebrew Atbash: The Original Cipher. The Atbash cipher originated in the Hebrew language and was used in ancient Hebrew texts, most notably in biblical ...
  11. [11]
    01 What is the Atbash Cipher? - GC Wizard
    The Hebrew alphabet consisting of 22 characters is divided into two halves of 11 letters each (א-כ and ל-ת), these are directly assigned to each other. This is ...<|control11|><|separator|>
  12. [12]
    AtbashCipher | Wolfram Function Repository
    Wolfram Language function: Encipher a string using the Atbash cipher ... Properties and Relations (1). AtbashCipher is an involutory function, i.e. it is its own ...
  13. [13]
    The Atbash Substitution Cipher
    Oct 28, 2018 · The Atbash cipher replaces each character by its reverse element in the alphabet. In particular 'A' becomes 'Z', 'B' becomes 'Y' and so on ...
  14. [14]
    The Phoenician Alphabet in Archaeology
    Sep 14, 2017 · Starting in the 11th century BCE, the script of the Phoenician alphabet was a real improvement on contemporary syllabic writing systems.
  15. [15]
    The AṬBḤ of R. Hiyya in Light of a Syriac, Greek and Coptic Cipher
    In all three scribal traditions—Greek, Coptic, and Syriac— this cipher was mainly used paratextually in order to encode scribes' names and prayers in colophons ...
  16. [16]
    jewish astrology in the talmud, pseudepigrapha, the dead sea scrolls
    An astrological belief was reminted into a Jewish idea. Even though astrological beliefs can be traced back to at least 1000. B.C. (Enuma Anu Enlil),4 the OT ...Missing: 2nd BCE
  17. [17]
    Secrets of the Dead Sea Scrolls - Cambridge University Press
    authors of the Damascus Document and the Qumran scribes, when they wished to disguise the name of a person or place, made use of a cipher known as atbash.
  18. [18]
    the qumran pesher and traits of ancient - jstor
    Gen 37). Although not strictly speaking a symbol, we may note here the oc currence of cryptic ciphers of the Atbash-type. This technique substitutes the ...
  19. [19]
    Structuralism and Kabbalah: - Sciences of Mysticism or - jstor
    This paper argues that Kabbalah, the generic term for Jewish mysticism, and structuralism, as articulated in anthropology by Claude Levi-Strauss,.
  20. [20]
    Gematria - Brill - Reference Works
    Following the Atbash method, for instance, the first letter of the Hebrew alphabet is substituted by the last, the second by the penultimate, and so on. Unlike ...
  21. [21]
    [PDF] pdf
    Handbook of Applied Cryptography by A. Menezes, P. van Oorschot and S ... More generally, see Fact 7.68. 7.49 Example (affine cipher – historical) The affine ...
  22. [22]
    [PDF] Module 10.4: Exploring Some Historical Ciphers - Discrete Math Hub
    Jan 30, 2020 · How would I represent the Atbash Cipher as an affine function? The operation is clearly c = f(p) = 25 − p mod 26, but this can also be ...Missing: derivation | Show results with:derivation
  23. [23]
    [PDF] Lecture 11: Cryptography - Harvard Mathematics Department
    Rot13 shifts by 13, and Atbash cypher reflects the alphabet, switch A with Z, B with Y etc. The last two examples are involutive: en- cryption is decryption ...
  24. [24]
    Systemizers Are Better Code-Breakers: Self-Reported ... - NIH
    May 17, 2016 · The Atbash cipher is a very specific case of a substitution cipher where the letters of the alphabet are reversed. In other words, all As are ...
  25. [25]
    (DOC) Jeremiah's use of the Atbash cipher - Academia.edu
    ... Atbash cipher is a basic encoding method known to be used in the Bible. ... atbash cipher was used to encode the name. Jeremiah 51:1 reads, “See, I will ...
  26. [26]
    Atbash Cipher - Reverse Mirror Alphabet - Online Decoder/Translator
    Aleph (first letter) ↔ Tav (last). — Beth ...
  27. [27]
    Atbash - Rumkin.com
    The Atbash cipher is a very common and simple cipher that simply encodes a message with the reverse of the alphabet. Initially it was used with Hebrew. ...Missing: self- inverse involutory
  28. [28]
    Atbash Cipher in Go on Exercism
    The first letter is replaced with the last letter, the second with the second-last, and so on. An Atbash cipher for the Latin alphabet would be as follows:
  29. [29]
    [PDF] A-Book-on-Classical-Cryptography-by-Madness.pdf
    Historically, such ciphers were used for serious secret-keeping up to and into the Second World War, around which time mechanical ciphers came into use.
  30. [30]
    The Da Vinci Code Chapter 77 Summary & Analysis - LitCharts
    Need help with Chapter 77 in Dan Brown's The Da Vinci Code? Check out ... The Atbash Cipher, though simple, effectively obscures the keystone's true ...
  31. [31]
    Atbash - The Jewish Chronicle
    Readers of Dan Brown's blockbusting thriller, "The Da Vinci Code," will recall that the atbash cipher plays a crucial role in the verse clue that Jacques ...
  32. [32]
    List of cryptograms | Gravity Falls Wiki - Fandom
    The following is a list of cryptograms from Gravity Falls. There is a cryptogram during the credits of each episode. They use Caesar ciphers, Atbash ciphers, ...List of cryptograms/Episodes · Books · List of cryptograms/GalleryMissing: examples | Show results with:examples
  33. [33]
    Welcome to pycipher's documentation! - Read the Docs
    Common classical ciphers implemented in Python. The code is hosted on GitHub ... Decipher string using the Atbash cipher. Example: plaintext = Atbash ...
  34. [34]
    Atbash latin: Encode and decode online - Cryptii
    Originally used to encode the hebrew alphabet, Atbash (אתבש ) is formed by mapping an alphabet to its reverse, so that the first letter becomes the last letter.Missing: involutory nature self-<|separator|>