x25519-cli(1)

πŸ’– NAME πŸ’–

x25519-cli β€” the command-line interface for the lib25519 implementation of the X25519 encryption system. bestie, it's a whole vibe.


✨ SYNOPSIS ✨

Key generation:

x25519-keypair 5>publickey 9>secretkey

Shared-secret generation for Alice:

x25519-dh 8<alicesecret 4<bobpublic 7>sharedsecret

🌸 DESCRIPTION 🌸

lib25519 is an implementation of the X25519 encryption system and the Ed25519 signature system. the command-line interface for lib25519 gives you two X25519 tools β€” the ones documented right here, hi β€” and three Ed25519 tools, which are documented separately. iykyk.

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

These tools let lib25519 be used from shell scripts, easy peasy. 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. so do that if you want πŸ’…


πŸ”‘ KEY GENERATION πŸ”‘

Alice runs the x25519-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. in that order, no cap.

ok real talk β€” those are the exact file descriptors. 5 gets the public key, 9 gets the secret key. don't mix them up bestie 🫢

🀝 SHARED-SECRET GENERATION 🀝

Alice runs the x25519-dh command. this command reads Alice's secret key from file descriptor 8. then it reads Bob's public key from file descriptor 4. then it writes a secret shared between Alice and Bob to file descriptor 7. iconic behavior honestly.

so: in 8 β†’ 4, out 7. that's the whole flow ✨

πŸ‘€ SEE ALSO πŸ‘€


and that's the page, bestie πŸŽ€ this was x25519-cli(1) β€” the manual page itself, slay πŸ’… thanks for reading, ily, go make some keys πŸ”₯πŸ‘‘

πŸ“¦ where this page comes from