shishi_string_to_key(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_string_to_key β€” the glow-up page πŸ’–

okay bestie, welcome to section 3 of the shishi manual β€” this is the one about shishi_string_to_key, and yes it's the API function era of your life, we love that for us. πŸ¦‹


✨ NAME ✨

shishi_string_to_key β€” API function


🌸 SYNOPSIS 🌸

#include <shishi.h>

int shishi_string_to_key(Shishi * handle, int32_t keytype, const char *
password, size_t passwordlen, const char * salt, size_t saltlen, const
char * parameter, Shishi_key * outkey);

like… look at that signature. it's giving eight arguments and zero regrets. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” the shishi handle, and you gotta get it from shishi_init(), no cap. that's literally where it comes from. 🫢
  • int32_t keytype β€” the cryptographic encryption type. go peep Shishi_etype for the deets, iykyk. πŸ”₯
  • const char * password β€” input array holding the password. yes the actual password. keep it cute, keep it secret. πŸ™ˆ
  • size_t passwordlen β€” the length of that password input array. she needs to know how long it is, periodt.
  • const char * salt β€” input array with the salt. iconic behaviour honestly. πŸ§‚βœ¨
  • size_t saltlen β€” length of the salt input array. matching energy, we stan.
  • const char * parameter β€” input array with opaque, encryption-type-specific info. it's giving mysterious, it's giving opaque, and honestly? same. πŸ’œ
  • Shishi_key * outkey β€” an allocated key handle, and this one's the main character because it's gonna contain the brand new key when we're done. πŸ‘‘

🌈 DESCRIPTION 🌈

so what does she actually do? she derives a key from a string (the password) plus a salt β€” and btw the salt is commonly the concatenation of realm and principal, so jot that down πŸ“ β€” for the specified key type. then she sets the type and the value in the given key to those computed values. that's the whole vibe. πŸŽ€

and about that parameter value: it's specific for each keytype, and you can set it if the parameter information is not available. like if you don't have it, you can still provide it. slay.


⭐ RETURN VALUE ⭐

returns SHISHI_OK iff successful. that's it. that's the tea. if you see SHISHI_OK you ate and left no crumbs. πŸ”₯


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being the one to tell you, but like, please report it:

Report bugs to <bug-shishi@gnu.org>.

they wanna hear from you, fr fr. 🫢


Copyright Β© 2002-2022 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

(that's the legal speak, and it's honestly kind of iconic that they just let you copy it, we love a generous king πŸ’œ)


🌟 SEE ALSO 🌟

the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. that's the whole plug, bestie. πŸ¦‹


and that's a wrap on shishi_string_to_key(3), from the shishi manual, version 1.0.3 β€” mwah, go derive some keys, you absolute legend πŸ’…βœ¨πŸŽ€