SYD-KEY(1)
π SYD-KEY(1) β the key-making one, bestie π
okay so this is a page from the General Commands Manual, and it's all about syd-key π
β¨ NAME β¨
syd-key β a little utility that generates encryption keys and saves them to keyrings(7) ποΈβ¨
πΈ SYNOPSIS πΈ
syd-key [-hpP] [-d keydesc] [-t keytype] [-k keyring]
π¦ DESCRIPTION π¦
Okay so here's the vibe: syd-key generates random 256-bit encryption keys, and it does it using the Linux Kernel's random number generator (yes, the real one, no cap π₯).
Then it saves that key to Linux keyrings(7) and prints the key serial ID to standard output as a decimal 32-bit integer. That's it. That's the whole job. Iconic behavior honestly π
π OPTIONS π
-hβ displays help. cute, quick, does what it says π«Ά-pβ reads the passphrase from the controlling TTY (and NOTstdin(3), bestie, pay attention) and derives key material from it. So like βsyd-keywill flat-out refuse to read the passphrase fromstdin(3)for safety reasons, unless you explicitly pass-P. The passphrase gets hashed using SHA3-256, and the resulting digest is what gets stored with thekeyrings(7)interface. The passphrase buffer is zeroized after use (so no leftovers, we love a clean kitchen π§Ό). The key serial ID is printed onstdout(3). And if you supply neither-pnor-P? Then a random key is generated usinggetrandom(2)with theGRND_RANDOMflag instead. slay π«-Pβ reads the passphrase fromstdin(3)and derives key material from it. This one is intended for non-interactive use β like piping a passphrase in from a password manager, iykyk. But use it with caution, fr fr: reading a passphrase fromstdin(3)can be less secure than reading from the controlling TTY, because it may be observable by other processes, recorded in shell constructs, or otherwise leaked by the environment π. The passphrase is hashed using SHA3-256, and the resulting digest is stored with thekeyrings(7)interface. The passphrase buffer is zeroized after use. Key serial ID gets printed onstdout(3). Same deal as above: if none of-pPis supplied, a random key is generated usinggetrandom(2)with theGRND_RANDOMflag instead.-dkdesc β specify an alternative key description. The default isSYD-3-CRYPTπ-tktype β specify an alternative key type. The default isuserπΈ-kkring β specify an alternative key ring ID. The default isKEY_SPEC_USER_KEYRING. It may be exactly one ofthread,process,session,useroruser-session. It may also be a 32-bit decimal number specifying a keyring ID π
π CAVEATS π
Okay this part matters, so listen up bestie π«Ά
Keys in keyrings(7) are identified by their (type, description) pair. So when syd-key invokes add_key(2) with a type/description combo that already exists in the target keyring, the kernel will update the existing key's payload instead of creating a brand new key. Not a new key. It just updates the old one. π
So if you actually want to force creation of a new key, use a unique description β for example by appending a UUID or a timestamp. Do that and you're golden β¨
π SEE ALSO π
syd(1), syd(2), syd(5), syd-aes(1), getrandom(2), add_key(2), keyrings(7)
syd homepage: https://sydbox.exherbo.org/ π
π AUTHORS π
Maintained by Ali Polatel. Up-to-date sources can be found at https://gitlab.exherbo.org/sydbox/sydbox.git and bugs/patches can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues. Wanna discuss? Come hang in #sydbox on Libera Chat or in #sydbox:mailstation.de on Matrix π¬π
and that's the whole page, babe π this was SYD-KEY(1), dated 1980-01-01, with SYD-KEY(1) sitting pretty in that footer spot β go make some keys, you've got this π
β¨π¦
π¦ where this page comes from
- nixos 26.05: sydbox 3.51.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms