Elliptic Curve Signature Verify
Returns one boolean, settles the whole argument
- public_key
- signature
- data
- verification
ECVerify is the payoff node of the pack's ECDSA signing chain: it takes a public key, a signature, and some data, and answers the only question that matters - did this really get signed by the matching private key? - with a single BOOLEAN. It's "Elliptic Curve Signature Verify," and if you've built a signing workflow with ECPrivateKey + ECSign, this is how you close the loop on the receiving side.
What it needs
Three required inputs, all forced-input types, so it only works when you wire things in:
public_key(KEYOBJ) - the parsed public key. Feed itECPublicKey'spublic_keyoutput, or a key you loaded viaDERPublicKey/PEMPublicKey. Remember it's the pack'sKEYOBJtype, not serialized bytes - paste inpublic_bytesand it won't connect.signature(BYTESLIKE) - the signature blob fromECSign.data(BYTESLIKE) - the exact bytes that were signed. "Exact" is doing a lot of work here: a trailing newline, a space, a different encoding, and verification silently fails. Both sides must be signing the same byte sequence.signature_algorithm- must match the signer's choice exactly (SHA256,SHA384, SHA-3, BLAKE2, all 15 of them). The verify side re-hashes the data with this and compares against the ECDSA signature.prehashed(optional) - mirrorECSign's setting. If the signer hadprehashedon, so must you.
The output
verification(BOOLEAN) -Trueif the signature checks out,Falseif not. That's the entire output, so wire it into aBooleanOutputter(same pack) or any node that takes a boolean. ComfyUI will show you the value in the node's output widget too, which is usually enough for debugging.
The mechanism, briefly
ECDSA signs a hash of the data, not the data itself. On verify, the node re-hashes data with your chosen signature_algorithm (via ec.ECDSA(algorithm)), runs public_key.verify(signature, data, alg), and catches InvalidSignature/ValueError to return False instead of crashing. Which means the failure modes are mostly boring and correct: wrong key, wrong hash, or tampered data all just return False. No loud errors, just a "no."
Installing it
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/AzelusLightvale/ComfyUI-ARG-Toolkit
Restart ComfyUI. ComfyUI Manager can do it too - search "ComfyUI ARG Toolkit" - and it'll grab the pip deps (cryptography is the verifier's engine) automatically.
Where people get burned
- Verifying bytes that don't match. This is the big one. If the message went through a
ByteslikeEncode/decode round trip, or text got case-normalized somewhere, the signature won't verify. Sign and verify the exact same bytes. - Algorithm drift.
SHA256on the sign side,SHA384on the verify side → permanentFalse. Keep them locked together. - Wrong key. A public key derived from a different private key - or a different curve - returns
Falseevery time, and there's no message explaining why. Check yourkey_sourcewiring inECPublicKeyif you're using Fresh Key on the wrong node. - Reading too much into it. A
Trueproves the holder of the matching private key signed those exact bytes. It does not prove the data is true, useful, or from a person you'd trust - that's the standard caveat with signatures.
For an ARG, this is where "is this real?" gets a mechanical answer. Embed a signature in a watermark, and this node is the automated proof-checker at the end of the trail.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| public_key | KEYOBJ | — | |
| signature | BYTESLIKE | — | |
| data | BYTESLIKE | — | |
| signature_algorithm | COMBO | The hashing algorithm used for the signature. | |
| prehashedopt | BOOLEAN | Whether the data is prehashed or not. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| verification | BOOLEAN | — |