Nodes/ComfyUI ARG Toolkit/Rotate-47 Cipher
ComfyUI Node

Rotate-47 Cipher

Rotate the whole printable ASCII set, punctuation included

By AzelusLightvale·Created 12 months ago·Updated 5 days ago· 1
Rotate-47 Cipher
    • encrypted_txt
    textHello World!
    alphabetENGLISH
    modetrue
    keep_formattingtrue

    ROT47 is the rotation cipher that cheats in the good way: instead of just letters, it shifts the whole printable ASCII range - characters 33 (!) through 126 (~), all 94 of them - by 47 places. Because 47 is exactly half of 94, it's self-inverse just like ROT13, but its output looks nothing like text. Letters become punctuation, punctuation becomes letters, and a plain sentence turns into something that looks like a corrupted font rendering: Hello World becomes something like w6==@ (@C=5. That's the party trick, and it's why ARG designers love it - ROT47 output reads as complete gibberish to a casual glance, which is a stronger "this is a clue" signal than ROT13 ever gives.

    The Rot47 node is fixed and keyless. Inputs are the pack's classical template:

    • text - the message, plain string.
    • alphabet - defaults to ENGLISH, but for ROT47 to do its full range trick it really wants the full printable-ASCII alphabet. If you leave the default and your text is plain letters, the node behaves more like a letters-only rotation - so if you want the punctuation-scrambling effect, feed the ASCII alphabet rather than the English default. This is the one Rot* node where the alphabet field actually matters.
    • mode - encrypt or decrypt. Same operation; the toggle is cosmetic.
    • keep_formatting - on by default, which only transforms letters and restores case/punctuation. Turn it off to get the compact, lowercase, no-spaces form.

    Output is encrypted_txt, a STRING.

    Use cases: obfuscating a URL or a short clue where you want every character scrambled, including the slashes and dots a plain ROT13 would leave untouched. ROT47 is genuinely the right tool when the message is "go to this path" and you don't want the slashes giving it away. On the solving side, it's the classic "why does this clue look like mojibake" answer - if you see characters that look like they came from the wrong encoding, try ROT47 before you suspect data corruption.

    Install: ComfyUI Manager → "ComfyUI ARG Toolkit" → install → restart, or:

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

    Restart ComfyUI; it's under ARG Toolkit/Cryptography/Classical, next to its Rot siblings. No model downloads.

    One expectation to set: the pack's Rot* nodes share the same template, and the author is upfront that this is an amateur project with light test coverage. ROT47 is simple enough that it behaves, but if your output looks wrong, first check whether the alphabet field is set to something that covers the characters you're feeding it - that's the one input here that can genuinely change what the node does.

    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