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

EdDSA Public Key Bytes

Get an Ed25519 public key out in the format you actually need

By AzelusLightvale·Created 12 months ago·Updated 5 days ago· 1
EdDSA Public Key Bytes
  • private_key
  • serialized_key
  • public_bytes
  • public_key
key_sourceFresh Key
key_typeEd25519
encodingPEM
formattingSubjectPublicKeyInfo

Once you've got an Ed25519 private key, the public key is derived math - the public half of the pair that everyone can see and that EdDSAVerify checks signatures against. EdDSAPublicKeyFormat ("EdDSA Public Key Bytes") is the node that derives it and spits it out in the format your puzzle or your friend's verify node expects.

How the key source works

The key_source dropdown has three modes, and picking the right one is the entire game:

  • Fresh Key - generates a brand-new private key internally, then derives the public key. Fine for standalone "give me a keypair" jobs, but the private half is gone unless you captured it, so you can't sign with it. Usually not what you want for a real workflow.
  • From Private Bytes - you feed private_bytes (BYTESLIKE) into the optional input and the node reconstructs the private key from those raw bytes, then derives the public key. This is the mode for reproducibility: save private_bytes from EdDSAPrivateKeyFormat, load them back here on every run, get the same public key every time.
  • From Loaded Key - you wire a KEYOBJ into serialized_key (from EdDSAPrivateKeyFormat's private_key output or a loader node) and it derives from that. Cleanest when the private key is already flowing around the graph as an object.

The inputs that matter

  • key_type - Ed25519 or Ed448; must match the private key's type or the derivation fails.
  • encoding - PEM, DER, OpenSSH, or Raw. OpenSSH encoding is Ed25519-only.
  • formatting - SubjectPublicKeyInfo (the standard, default), Raw (the bare 32-byte point), or OpenSSH (the ssh-ed25519 AAAA... line). OpenSSH formatting requires OpenSSH encoding, and again only for Ed25519.

Outputs

  • public_bytes (BYTESLIKE) - the serialized public key in your chosen format. This is the thing you publish: paste it into a README, hide it in a watermark, or hand it to the verification side.
  • public_key (KEYOBJ) - the parsed object, for wiring directly into EdDSAVerify's public_key input.

Installing it

Same as every node in the pack:

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

Restart ComfyUI. ComfyUI Manager finds it under "ComfyUI ARG Toolkit" and handles the cryptography dependency and the rest.

Where people get burned

  • Fresh Key amnesia. Derive a public key with Fresh Key, and there's no private key anywhere to sign with. If you're building a signing loop, use From Private Bytes or From Loaded Key and keep the private side alive.
  • Format mismatches. OpenSSH formatting only pairs with OpenSSH encoding, and only on Ed25519. Raw + Raw gives you the bare point. Trying to combine them errors out or produces garbage.
  • Key type drift. Derive from an Ed25519 private key but leave key_type on Ed448 and the reconstruction fails. Keep both ends on the same algorithm.

The public key is the boring, sharable half - this node just makes sure you can get it out in a form the other side can actually use. Derive it once, publish it, and let EdDSAVerify do the proving later.

CategoryARG Toolkit/Cryptography/Modern/Asymmetric

Inputs (6)

NameTypeDefaultDescription
key_sourceCOMBOFresh KeyThe source of the private key to be used to sign the message
key_typeCOMBOEd255192 options: Ed25519, Ed448
encodingCOMBOPEM4 options: PEM, DER, OpenSSH, Raw
formattingCOMBOSubjectPublicKeyInfo3 options: SubjectPublicKeyInfo, Raw, OpenSSH
private_keyoptBYTESLIKEOnly applicable if key_source is 'From Private Bytes'.
serialized_keyoptKEYOBJ

Outputs (2)

NameTypeDescription
public_bytesBYTESLIKE
public_keyKEYOBJ