Nodes/ComfyUI ARG Toolkit/Myszkowski Transposition Cipher
ComfyUI Node

Myszkowski Transposition Cipher

The transposition cipher that handles repeated letters

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

    Most classical ciphers you'll meet in an ARG either substitute letters or shuffle them around. Myszkowski is a shuffler - a transposition cipher, and the less famous, more annoying cousin of the columnar transposition. It earns a node here because it shows up in puzzle hunts just often enough that you want it one click away, and it's miserable to do by hand once your message gets long.

    The setup: you write your plaintext into a grid, one row per letter of your keyword, left to right. Then you read the columns back out in the order the keyword's letters appear alphabetically. The twist that makes it "Myszkowski" instead of plain columnar: when the keyword has repeated letters, the columns under those duplicate letters get read top-to-bottom as a group, in column order, before you move on. Repeated letters are exactly what breaks naive columnar transposition, and this scheme exists to handle them gracefully.

    The node wraps secretpy's implementation, and like every cipher node in this pack it shares the same input shape:

    • text - your message, a plain string (the default placeholder is Hello World!).
    • key - the keyword that determines the column order. Any text in the alphabet's language.
    • alphabet - defaults to ENGLISH; leave it or supply a custom alphabet or a secretpy predefined name.
    • mode - encrypt or decrypt.
    • keep_formatting - on by default, which encrypts only letters and restores uppercase and punctuation so the output still reads like a sentence. Turn it off to get clean lowercase ciphertext with no spaces, which is what you'd actually pass to someone in a puzzle.

    One output, encrypted_txt, a STRING you can chain into another cipher or dump to a text save node. Transposition ciphers love being layered - run Myszkowski, then a keyword substitution, and you've got a two-stage puzzle without writing any code.

    Installation is the pack standard: ComfyUI Manager → search "ComfyUI ARG Toolkit" → install → restart. Manual route:

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

    Restart ComfyUI; it shows up under ARG Toolkit/Cryptography/Classical. No model downloads; the pack's Python deps (secretpy, cryptography, reedsolo, steganography libraries) install via Manager automatically.

    Practical notes. Decryption needs the exact same keyword and alphabet as encryption - the tooltip's "any text in the alphabet's language" is doing a lot of work; if the key has a character outside your alphabet, the result will be garbage and won't error, so check the key first. And keep the author's own caveat in mind: the pack's tests cover the common cases, not edge cases, so treat a strange result on a long or heavily punctuated message as a place to double-check your inputs before blaming the node.

    CategoryARG Toolkit/Cryptography/Classical

    Inputs (5)

    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.
    keySTRINGAccepts any text in the alphabet's language as the key to decrypt/encrypt.

    Outputs (1)

    NameTypeDescription
    encrypted_txtSTRING