shishi_dk(3)
π shishi_dk β the API function that derives a key from a key, bestie π
okay so like, this is shishi_dk(3) from the shishi manual, and it is genuinely one of those little functions that's doing a LOT behind the scenes. it's an API function, and if you're in the shishi universe you already know what that means. come on, let's go π¦
β¨ SYNOPSIS β¨
#include <shishi.h>
int shishi_dk(Shishi * handle, Shishi_key * key, const char *
prfconstant, size_t prfconstantlen, Shishi_key * derivedkey);
look at her. five arguments. no notes. π
π ARGUMENTS π
Shishi * handleβ the shishi handle, and yes it has to be the one you got fromshishi_init(). no bootleg handles, bestie. πShishi_key * keyβ the input cryptographic key you're gonna use. your raw material, your main character. πconst char * prfconstantβ an input array holding the constant string. this is the lil flavor packet you're stirring in. πΈsize_t prfconstantlenβ the size of that input array with the constant string. yes, you have to tell it how big it is. it's not gonna guess. πShishi_key * derivedkeyβ pointer to the derived key, and heads up: the caller allocates this. that's you. you're the caller. you're the one allocating. π«Ά
π DERIVE A KEY FROM A KEY AND A CONSTANT THUSLY π
here's the whole vibe, mathematically, no cap:
DK(KEY, PRFCONSTANT) = SHISHI_RANDOM-TO-KEY(SHISHI_DR(KEY,
PRFCONSTANT)).
it's giving nested. it's giving two-step. first SHISHI_DR, then SHISHI_RANDOM-TO-KEY on top of that result. iconic behavior fr fr. β
π₯ RETURN VALUE π₯
returns SHISHI_OK iff successful. that's the only outcome we accept. anything else? we don't know her. π
π REPORTING BUGS π
found a bug? (rude, but okay.) report it to <bug-shishi@gnu.org>.
GNU Shishi home page: http://www.gnu.org/software/shishi/
General help using GNU software: http://www.gnu.org/gethelp/
go tell the maintainers, they actually want to know. don't suffer in silence, babe. π
Β©οΈ COPYRIGHT Β©οΈ
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 slay. keep the notice, keep the notice. periodt. π )
π 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. π§
that's the whole page, bestie. you understood it, you ate it, no crumbs. π
sending you off with the official receipt: this was shishi version 1.0.3, page shishi_dk(3), and it's giving very much 1.0.3 energy. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms