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

Rotate-5 Cipher

Rotate the digits, leave the letters alone

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

    ROT5 is the digits-only sibling of ROT13: every number shifts five places, 0↔5, 1↔6, 2↔7, 3↔8, 4↔9. Because 5 is half of 10, it's its own inverse, same trick as ROT13. The Rot5 node in the pack is a tiny thing - no key, no decisions to make - but it exists for a real reason: puzzles love scrambling the numeric parts of a clue while leaving the words readable. Dates, coordinates, phone numbers, ciphertext keys. If you've ever squinted at a puzzle page where the letters look fine but the numbers are suspiciously jumbled, you've met ROT5.

    The inputs are the pack's standard classical template minus the key (the rotation is fixed at 5):

    • text - the message, plain string.
    • alphabet - ENGLISH by default; leave it unless you know what you're doing.
    • mode - encrypt or decrypt. As with ROT13, both are the same operation, so this toggle is cosmetic.
    • keep_formatting - on by default: case and punctuation preserved around the rotated digits.

    Output is encrypted_txt, a STRING.

    The honest framing: this is a filler utility node, and that's fine. It doesn't do anything you couldn't do with a find-and-replace script, but inside ComfyUI it's one less trip outside the graph, and it chains cleanly - run a number through Rot5, then wire the result into a bytes converter or another cipher node. It's also a good teaching node: because it only touches digits, you can confirm exactly what the pack's keep_formatting behavior does without a wall of letters to decode.

    Install is the standard pack story: ComfyUI Manager → search "ComfyUI ARG Toolkit" → install → restart, or:

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

    Restart ComfyUI and it's under ARG Toolkit/Cryptography/Classical. No models, no extra downloads - the classical ciphers run on secretpy, which Manager installs with the pack.

    The only gotcha is the classic half-rotation one: ROT5 applied twice gives you the original number back, so don't panic if "encrypting" a digit string once produces something that looks like it could be the plaintext of another. That's the property, not a bug. And if a puzzle hands you ROT5-encoded digits, the decrypt button is literally the same as the encrypt button.

    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