ed25519-cli(1)

πŸ’– ed25519-cli β€” bestie's guide to the lib25519 command-line tools πŸ’–

okay so this is the manual page for ed25519-cli, the command-line interface for the lib25519 implementation of the Ed25519 signature system. and honestly? she's giving cryptography but make it shell-script friendly. let's go πŸ¦‹


✨ NAME ✨

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


🌸 SYNOPSIS 🌸

key generation, bestie:

ed25519-keypair 5>publickey 9>secretkey

signature generation, let's get signing:

ed25519-sign 8<secretkey <message >signedmessage

signature verification and message recovery, the vibes check:

ed25519-open 4<publickey <signedmessage >message

πŸ’… DESCRIPTION πŸ’…

so lib25519 is an implementation of the X25519 encryption system and the Ed25519 signature system, periodt. the command-line interface for lib25519 hands you three Ed25519 tools β€” which is literally what this page is about β€” plus two X25519 tools that are documented separately (go read those ones elsewhere, iykyk).

each tool exits nonzero on failure (like, for example, running out of memory 😭), and 0 on success. no in-between, no drama.

the whole point of these tools is that they let lib25519 be used super easily from shell scripts 🫢. other languages can absolutely use lib25519 through these tools too, but honestly languages usually have good support for FFI and can just use the C interface directly. main character energy either way.


πŸ”‘ KEY GENERATION πŸ”‘

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


✍️ SIGNATURE GENERATION ✍️

Alice runs the ed25519-sign command. this one reads Alice's secret key from file descriptor 8. then it reads a message (into memory!) from standard input, aka file descriptor 0. it signs that message using Alice's secret key, and then writes the signed message to standard output, aka file descriptor 1. slay πŸ’…


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

Bob runs the ed25519-open command. it reads Alice's public key from file descriptor 4. then it reads a signed message (into memory, again) 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. ate, no crumbs.

🚨 ok important one, listen up: for ed25519-open, exit code 100 specifically means an invalid signature. and bestie, if you retry on the same input it will then always fail β€” like, it's not gonna change its mind. in this case, ed25519-open produces an empty output. so don't go piping that into anything expecting a message πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

x25519-cli(1), lib25519(3)


and that's the whole page, babe 🌈 go forth and sign things securely. this was ed25519-cli(1), mwah πŸ’œ

πŸ“¦ where this page comes from