shishi_pbkdf2_sha1(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_pbkdf2_sha1 ✨

okay bestie, gather round, because we're about to talk about the shishi manual, section 3, and specifically the little icon that is shishi_pbkdf2_sha1 β€” an API function, no cap πŸ’…


🌸 NAME 🌸

shishi_pbkdf2_sha1 β€” an API function. that's it, that's the name, she's an API function and she's serving 🫢


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta invite her in:

#include <shishi.h>

and then, the moment you've all been waiting for:

int shishi_pbkdf2_sha1(Shishi * handle, const char * P, size_t Plen,
const char * S, size_t Slen, unsigned int c, unsigned int dkLen, char *
DK);

seven arguments, all of them important, none of them optional. she's high maintenance but she's worth it πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi * handle β€” the shishi handle, as allocated by shishi_init(). your girl needs her handle, she does not do anything without it.
  • const char * P β€” the input password, an octet string. yes bestie, the password.
  • size_t Plen β€” the length of that password. also an octet string. it's giving "we measure everything here".
  • const char * S β€” the input salt, an octet string. gotta season it, periodt.
  • size_t Slen β€” the length of the salt, an octet string. measuring the seasoning, as one does.
  • unsigned int c β€” the iteration count, a positive integer. the more you iterate, the more it hurts (affectionately).
  • unsigned int dkLen β€” the intended length in octets of the derived key. a positive integer, and at most (2^32 - 1) * hLen. ⚠️ and listen: the DK array must have room for this many characters. not "roughly", not "about", this many. plan accordingly bestie.
  • char * DK β€” the output derived key, a dkLen-octet string. this is where the magic lands. πŸͺ„

🌈 DESCRIPTION 🌈

so what does she actually do? she derives a key using the PBKDF2 defined in PKCS5. that's the whole vibe.

PBKDF2 applies a pseudorandom function to derive keys. and the length of the derived key? essentially unbounded. like, go off, key, be as long as you want πŸ‘‘

but wait β€” the maximum effective search space for the derived key may be limited by the structure of the underlying pseudorandom function, and in this function the underlying PRF is always SHA1. so jot that down. πŸ“

⭐ RETURN VALUE ⭐

Returns SHISHI_OK iff successful. that's the only answer we accept, honestly. if it's not SHISHI_OK, something went sideways and we don't talk about it πŸ™ˆ


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me manifesting it, but if it happens, report it to <bug-shishi@gnu.org>.


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. iconic, honestly. free to share, just keep the receipts πŸŽ€


🧚 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. iykyk πŸ“–βœ¨


and that's the whole page, bestie πŸ’œ this was shishi version 1.0.3, and yes, she's still shishi_pbkdf2_sha1(3) β€” go forth and derive responsibly 🌸🫢