RSA Signature Signer
Stamp your workflow's output so anyone can check it
- private_key
- data
- signature
A signature doesn't hide anything. It proves a specific person - or specific graph - produced a specific string of bytes, and that nobody edited it since. In an ARG that's the difference between a clue and a leak: hand a solver a message plus a public key and they can verify it's yours before wasting three hours on a forgery.
RSA Signature Signer does the stamping. It lives in the modern-cryptography branch of ComfyUI ARG Toolkit - the pack that crams ciphers, steganography and key handling into ComfyUI so you're not alt-tabbing to CyberChef mid-build.
The mechanism
It's private_key.sign(data, padding, algorithm) from pyca/cryptography, with the padding built according to your two dropdowns. Two real choices hide in there.
padding_alg - PSS (the default) or PKCS1v15. PSS is the modern scheme: it mixes in a random salt, so the same message signed twice gives two different, equally valid signatures. PKCS1v15 is the older deterministic scheme, still fine for compatibility, still accepted everywhere. If you're matching an existing signature or a tool that only speaks one of them, this is not a preference - it's a hard requirement.
salt_length - Max Length, Digest Length, or Manual with salt_length_manual (1–65536). It only applies to PSS, and it does not change the signature's size - that's always as long as the modulus. It changes determinism and compatibility: Max Length is the most conservative, and remember the salt length when you verify, because PSS verification with the wrong salt length fails as hard as wrong padding. PKCS1v15 ignores the field entirely.
signature_algorithm - 15 options: the SHA-2 family plus SHA-512/224, SHA-512/256, BLAKE2b, BLAKE2s, the four SHA-3 sizes, and SHA1/MD5/SM3 for legacy puzzle flavour. Annoyingly it ships with no default, so a freshly dropped node sits on SHA224 - which is not what anyone means. Set SHA256 and move on. The same algorithm is the MGF1 hash inside PSS, so there's no mixing.
prehashed - leave it off unless the bytes arriving at data are already a digest; turn it on with unhashed data and you sign a digest-of-a-digest that verifies nowhere.
The inputs and outputs
private_key is a KEYOBJ and data is a BYTESLIKE, both forced sockets - you can't type into them. The key comes from RSA Private Key Bytes (key_object) or one of the serialized private-key loaders, which take existing PEM/DER/OpenSSH key bytes. The data usually comes from Bytes-like Object Encode, which turns your text into bytes as UTF-8, Base64, Hex, Binary or a Raw Bytes literal. That's the plumbing tax of the pack: text is STRING, the crypto nodes speak BYTESLIKE, and the converters between them are mandatory.
The single output, signature, is type SIGNATURE, and there is exactly one consumer in the pack: RSA Signature Verification. That has a practical consequence: you can't pipe it into Bytes-like Object Decode to get a hex string, because SIGNATURE isn't BYTESLIKE and ComfyUI won't connect unlike types. If your plan was "sign it, print the hex, paste it into a puzzle," the graph will fight you.
Getting a verify to actually pass
Wire key_object from the private key node into both the signer and RSA Public Key Bytes in "From Loaded Key" mode, and feed that derived public key into the verifier. Then match the verifier's signature_algorithm, padding_alg, salt_length and prehashed to the signer's, exactly. Every one of those four is compared: a PSS signature made with Max Length salt won't verify against Digest Length. This is the number one reason people see false and assume the pack is broken.
Second reason: they regenerate the key. There's no IS_CHANGED in the pack, so ComfyUI caches these nodes and your signature stays byte-identical across queue presses - people expecting PSS to differ each run think it's stuck. Change the message or any widget and you get a fresh randomized signature that still verifies. Not flakiness.
Installing
Manager: search ComfyUI ARG Toolkit, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Don't pip install -r requirements.txt into a working ComfyUI env - it's a uv lockfile pinning torch==2.14.1 / torchaudio==2.11.0, and pip will try to honour that against your CUDA build. The signer needs only:
pip install cryptography
Python >=3.12 is declared by the project. And because __init__.py imports every module under src/, a missing unrelated dependency (stegano, invisible-watermark) means the entire pack, including this node, vanishes from the menu - check the console for the import error rather than assuming the install failed.
Fair warning: this pack is one person's project with essentially no community footprint - search for it on reddit and you get nothing - and the README admits the modern-crypto section is WIP. Verify your own sign/verify pair before shipping a puzzle that depends on it.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| private_key | KEYOBJ | — | |
| data | BYTESLIKE | — | |
| salt_length | COMBO | Max Length | The length of the salt. |
| signature_algorithm | COMBO | The hashing algorithm used for the signature. | |
| padding_alg | COMBO | PSS | 2 options: PSS, PKCS1v15 |
| prehashedopt | BOOLEAN | Whether the data is prehashed or not. | |
| salt_length_manualopt | INT | 1–65536 | For only when salt_length is `Manual`. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| signature | SIGNATURE | — |