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.5gets the public key,9gets 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: in8β4, out7. 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
- nixos 26.05: lib25519 20241004
- nixpkgs unstable: lib25519 20260614
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms