ed25519-cli(1)

πŸ’– ed25519-cli πŸ’–

okay bestie, gather round, because this is the manual page for ed25519-cli β€” the command-line interface for the lib25519 implementation of the Ed25519 signature system. it lives in section 1 of the General Commands Manual (the "General Commands" girlies, you know the vibe) πŸŽ€


✨ NAME ✨

ed25519-cli β€” command-line interface for the lib25519 implementation of the Ed25519 signature system


🌸 SYNOPSIS 🌸

Key generation:

ed25519-keypair 5>publickey 9>secretkey

Signature generation:

ed25519-sign 8<secretkey <message >signedmessage

Signature verification and message recovery:

ed25519-open 4<publickey <signedmessage >message

πŸ¦‹ DESCRIPTION πŸ¦‹

so lib25519 is an implementation of the X25519 encryption system and the Ed25519 signature system. the command-line interface for lib25519 gives you three Ed25519 tools (documented right here, hi bestie πŸ’…) and two X25519 tools, which are documented separately.

every tool exits nonzero on failure (like, say, running out of memory 😭) and 0 on success. periodt.

these tools let lib25519 be used super easily from shell scripts. other languages can also use lib25519 through these tools, but honestly languages usually have good support for FFI and can just use the C interface directly. iykyk.


πŸ”‘ KEY GENERATION πŸ”‘

Alice runs the ed25519-keypair command. this command randomly generates Alice's secret key and Alice's corresponding public key. it writes the public key to file descriptor 5, and then writes the secret key to file descriptor 9.

not the usual 1 and 2, bestie β€” 5 and 9. the file descriptors are the whole personality here πŸ’…

✍️ SIGNATURE GENERATION ✍️

Alice runs the ed25519-sign command. this command reads Alice's secret key from file descriptor 8.

then it reads a message (into memory, so like, the whole thing bestie) from standard input (file descriptor 0). it signs the message using Alice's secret key, and then writes the signed message to standard output (file descriptor 1).

she ate. πŸ’–


πŸ•΅οΈ SIGNATURE VERIFICATION AND MESSAGE RECOVERY πŸ•΅οΈ

Bob runs the ed25519-open command. this command reads Alice's public key from file descriptor 4.

then it reads a signed message (into memory) from standard input (file descriptor 0). it verifies the signed message using Alice's public key, and then writes the verified message to standard output (file descriptor 1).

and now the important part, no cap: for ed25519-open, exit code 100 specifically means an invalid signature. if you retry on the same input at that point, it will always fail. πŸ’€

in that case ed25519-open produces an empty output. not a vibe, just a fact. note it down.

πŸ‘€ SEE ALSO πŸ‘€


mwah πŸ’‹ that's the whole page β€” go forth and sign things, main character energy only. this was ed25519-cli(1) from the General Commands Manual, section 1, page ed25519-cli(1), closing out exactly the way it came in 🫢✨

πŸ“¦ where this page comes from