Nodes/ComfyUI ARG Toolkit/Atbash (Reverse Alphabet) Cipher
ComfyUI Node

Atbash (Reverse Alphabet) Cipher

The Cipher So Simple You Could Write It on a Napkin

By AzelusLightvale·Created 12 months ago·Updated 5 days ago· 1
Atbash (Reverse Alphabet) Cipher
    • encrypted_txt
    textHello World!
    alphabetENGLISH
    modetrue
    keep_formattingtrue

    Atbash is the cipher with a history and zero keys. It maps each letter to its mirror in the alphabet - A becomes Z, B becomes Y, C becomes X - and that's the entire algorithm. It dates back to the Hebrew Bible (the name comes from the first, last, second, and second-to-last letters of the Hebrew alphabet), and in the modern puzzle world it shows up constantly as the "cute first step" in an ARG: it's solvable by eye once you know the trick, which makes it the perfect warm-up clue before a real cipher shows up.

    Because it's a straight substitution, Atbash is its own inverse - encrypting twice gets you back to the original text, and encrypting is the same operation as decrypting. The ARG Toolkit node still gives you a mode toggle because every classical cipher in the pack shares a common interface, but flipping it changes nothing about the math. That shared interface also means Atbash sits in the same "Cryptography → Classical" menu as the rest of the pack's ciphers, with the same text, alphabet, keep_formatting, and mode inputs and the same single encrypted_txt STRING output. The only difference from its siblings: no key input, because there's nothing to key.

    The inputs

    • text - your message. The only input you'll actually touch.
    • alphabet - defaults to ENGLISH. This is the one knob Atbash genuinely has: change the alphabet and the mirror changes with it. It accepts the named alphabets secretpy defines, so you can run a non-English Atbash by typing, say, the Russian alphabet's name here.
    • mode - encrypt/decrypt. Mathematical no-op here, but harmless.
    • keep_formatting - preserve spaces/punctuation (and case) or strip to a clean lowercase string.

    Where people get burned

    The number one Atbash "failure" is expecting a key. People wire this up, realize there's no key port, and assume they grabbed the wrong node - they didn't. The real operational gotchas are subtler: if keep_formatting is off, the output is a stripped lowercase string that won't preserve your original layout, which matters when you're crafting a clue that's meant to look like a sentence. And if you're checking your result against an online Atbash tool, remember the alphabet question - an English result and a Hebrew-ordered result for a 26-letter alphabet are the same, but custom alphabets diverge fast.

    One more thing worth knowing: because Atbash is a monoalphabetic substitution, it's trivially breakable with frequency analysis. Don't use it for anything you actually need to hide. Use it as the pack does - the "this is definitely a puzzle, now solve it" layer.

    Installing it

    Part of the ARG Toolkit pack, standard install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
    

    Restart ComfyUI and it's under ARG Toolkit → Cryptography → Classical (ComfyUI Manager: search "ComfyUI ARG Toolkit"). Depends on secretpy for the classical ciphers; Manager installs it, manual clones need pip install -r requirements.txt. Pure Python, nothing heavy.

    Troubleshooting

    • "There's no key input" → correct, that's the cipher. It's an involution; encrypt and decrypt are the same operation.
    • Output has no spaces/case → toggle keep_formatting back on.
    • Comparing to an online tool and they differ → check alphabet selection and formatting; the core mirror is universal.

    Atbash is the cipher you hand to someone who's never met a cipher before, and that's a feature, not a limitation. In a multi-step ARG it earns its place as the friendly on-ramp clue between "you found a code" and "the code means something."

    CategoryARG Toolkit/Cryptography/Classical

    Inputs (4)

    NameTypeDefaultDescription
    textSTRINGHello World!
    alphabetSTRINGENGLISHInput your alphabet here. If left blank, uses the alphabet default to the cipher. Uses standard connected format ('abcdef'), but can also accept the alphabets defined in secretpy in alphabets.py.
    modeBOOLEANtrueToggle between encrypting or decrypting a message.
    keep_formattingBOOLEANtrueToggle between preserving the format of the message or remove all spaces, punctuations, and convert to lowercase.

    Outputs (1)

    NameTypeDescription
    encrypted_txtSTRING