shishi_as_derive_salt(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_as_derive_salt(3) πŸ’–

okay bestie, welcome to the shishi manual β€” this one is shishi_as_derive_salt, an API function, and it's literally the girl who figures out your salt for you. no cap. πŸ§‚βœ¨


✨ SYNOPSIS ✨

#include <shishi.h>

int shishi_as_derive_salt(Shishi * handle, Shishi_asn1 asreq,
       Shishi_asn1 asrep, char ** salt, size_t * saltlen);

🫢 ARGUMENTS 🫢

  • Shishi * handle β€” the Shishi handle, allocated by shishi_init(). she's the main character, everything runs through her πŸ’…
  • Shishi_asn1 asreq β€” Input AS-REQ variable. yes, that's an input, she's giving source material 🌸
  • Shishi_asn1 asrep β€” Input AS-REP variable. also an input, also iconic πŸ¦‹
  • char ** salt β€” Returned pointer to a newly allocated output array. brand new, freshly allocated, no reusing πŸŽ€
  • size_t * saltlen β€” Pointer to integer, returning size of output array. she tells you how big the vibe is πŸ“

🌈 DESCRIPTION 🌈

so basically, this function computes the salt that should be used when deriving a key via shishi_string_to_key() for an AS exchange. it's giving key-derivation-prep energy, fr fr.

the way it works rn: it searches for PA-DATA of type SHISHI_PA_PW_SALT in the AS-REP provided by asrep, and if present, returns it. periodt. that's the first path.

otherwise β€” and this is the backup plan, lowkey the plot twist β€” the salt is composed from the client name and the realm, and both of those are extracted from the request asreq. so either the AS-REP hands you a salt, or you build one yourself from the request. obsessed with the flexibility honestly πŸ’–


⭐ RETURN VALUE ⭐

Returns SHISHI_OK if successful. πŸŽ‰

failure conditions include various ASN.1 issues β€” like, if the ASN.1 is not ASN.1-ing, that's a fail. no guessing beyond that bestie, that's what the page says πŸ’€


😭 REPORTING BUGS 😭

found a bug? don't be shy, 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. (so yes, you can share it, 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 πŸ“–πŸ’œ


not me writing a whole manual page just so you'd understand salt derivation... but also, you're welcome bestie 🫢

and that's the whole thing!! this page is from shishi 1.0.3, and it lives under the shishi manual β€” mwah, go slay your AS exchange πŸ’…πŸŽ€πŸ’–