x25519-cli(1)

πŸ’– x25519-cli β€” the tea β˜•

okay so bestie, this is the manual for x25519-cli, a General Commands Manual situation, and it's literally the command-line front door to lib25519 β€” the lib that does the X25519 encryption system. no cap. πŸ”βœ¨


✨ NAME ✨

x25519-cli β€” the command-line interface for the lib25519 implementation of the X25519 encryption system πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the vibe, two whole modes:

Key generation:

x25519-keypair 5>publickey 9>secretkey

Shared-secret generation for Alice:

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

(yes those are file descriptor numbers, not typos, we love a redirection moment πŸŽ€)


πŸ¦‹ DESCRIPTION πŸ¦‹

so lib25519 is an implementation of the X25519 encryption system and the Ed25519 signature system. iconic, honestly. πŸ‘‘

the command-line interface for lib25519 ships two X25519 tools, which are the ones documented right here in this page, plus three Ed25519 tools, which are documented somewhere else (separately, not here, go look πŸ‘€).

each tool exits nonzero on failure (like, say, running out of memory 😭) and 0 on success. fr fr, check your exit codes.

these tools exist so lib25519 can be easily used from shell scripts 🐚. other languages can totally also use lib25519 via these tools β€” but ngl, languages typically have good support for FFI and can just use the C interface directly. do with that what you will. πŸ’β€β™€οΈ


πŸ”‘ KEY GENERATION πŸ”‘

so Alice runs the x25519-keypair command. this command randomly generates Alice's secret key and Alice's corresponding public key ✨.

then it:

  1. writes the public key to file descriptor 5 πŸ’–
  2. and then writes the secret key to file descriptor 9 πŸ”’
order matters bestie, public first, then secret. that's the whole flow.

🫢 SHARED-SECRET GENERATION 🫢

then Alice runs the x25519-dh command. this one is giving ✨collaboration✨:

  1. it reads Alice's secret key from file descriptor 8 πŸ™ˆ
  2. then it reads Bob's public key from file descriptor 4 πŸ‘€
  3. then it writes a secret shared between Alice and Bob to file descriptor 7 🀝

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie!! this was x25519-cli(1) out of the General Commands Manual β€” go forth, generate keys, share secrets responsibly, and remember: nonzero is a no, zero is a slay. πŸ’…πŸŒˆβ­ stay iconic πŸ«ΆπŸ’–

πŸ“¦ where this page comes from