Nodes/ComfyUI ARG Toolkit/EdDSA Private Key Bytes
ComfyUI Node

EdDSA Private Key Bytes

Ed25519 private keys without the ECDSA baggage

By AzelusLightvale·Created 12 months ago·Updated 4 days ago· 1
EdDSA Private Key Bytes
    • private_bytes
    • private_key
    key_typeEd25519
    encodingPEM
    formattingPKCS8
    encryptionBest Available
    encryption_password

    Ed25519 is the modern, no-fuss signing algorithm: faster than ECDSA, smaller keys, and famously impossible to get subtly wrong the way you can with a hand-picked curve. EdDSAPrivateKeyFormat ("EdDSA Private Key Bytes") generates one of these keys and serializes it into PEM, DER, or raw bytes. If you're building a signature loop from scratch and don't have a legacy reason to use ECDSA, this is the key you want to start from.

    What it does

    It's the EdDSA cousin of ECPrivateKey - same shape, different algorithm family. The node calls Ed25519PrivateKey.generate() (or Ed448), then serializes. Two key type choices, a handful of format choices, and it hands you the key twice: once as bytes, once as an object.

    The inputs that matter

    • key_type - Ed25519 or Ed448. Ed25519 is the one to reach for: 32-byte keys, fast, universally supported. Ed448 exists for parity and slightly bigger security margin, but for an ARG there's no practical reason to leave the default.
    • encoding - PEM (text), DER (binary), or Raw (the bare 32-byte secret). Raw is the compact form you'd actually hide inside a puzzle; PEM is what you'd paste into a file.
    • formatting - PKCS8 (the standard), OpenSSH, or Raw. Two things to know: OpenSSH only works with Ed25519 (Ed448 + OpenSSH will error), and Raw pairs with Raw encoding.
    • encryption - Best Available encrypts the key, but only if encryption_password is actually filled in. None writes it in the clear. Same silent-plaintext gotcha as the EC node: choose Best Available and forget the password, and you get an unencrypted key with no warning.

    Outputs

    • private_bytes (BYTESLIKE) - the serialized key; save it, transport it, or feed it back into EdDSASignature/EdDSAPublicKeyFormat via their From Private Bytes mode.
    • private_key (KEYOBJ) - the parsed key object for wiring into the pack's other EdDSA nodes directly.

    Note there's no way to supply your own seed here - unlike ECPrivateKey's private_value, this node only generates fresh keys. If you need a deterministic key from fixed bytes, you'd use From Private Bytes on the signature or public key nodes with bytes you derived elsewhere. For reproducibility, save private_bytes and reuse them.

    Installing it

    Part of the ComfyUI ARG Toolkit, one install for everything:

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

    Restart, or use ComfyUI Manager's "ComfyUI ARG Toolkit" entry - it pulls cryptography (the actual EdDSA implementation) plus the rest of the pack's dependencies.

    Where people get burned

    • OpenSSH format on Ed448. The dropdown lets you try it; the code rejects it. Stick to Ed25519 if you need OpenSSH output.
    • Random key per run. A fresh key each execution means non-reproducible workflows. Save private_bytes and load them back in on the signature node.
    • Type confusion. The KEYOBJ/BYTESLIKE split trips up everyone new to the pack. The object goes to object inputs (From Loaded Key), the bytes go to bytes inputs (From Private Bytes).

    This is the "just works" choice for the modern half of the ARG Toolkit. Generate the key, hand private_key to EdDSASignature, derive the public half with EdDSAPublicKeyFormat, and you've got a clean Ed25519 signing identity with zero curve-selection anxiety.

    CategoryARG Toolkit/Cryptography/Modern/Asymmetric

    Inputs (5)

    NameTypeDefaultDescription
    key_typeCOMBOEd255192 options: Ed25519, Ed448
    encodingCOMBOPEM3 options: PEM, DER, Raw
    formattingCOMBOPKCS83 options: PKCS8, OpenSSH, Raw
    encryptionCOMBOBest Available2 options: Best Available, None
    encryption_passwordoptSTRINGThe password to use to encrypt the private key. Required if encryption is used.

    Outputs (2)

    NameTypeDescription
    private_bytesBYTESLIKE
    private_keyKEYOBJ