crypto_krb5_calc_PRFplus(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_krb5_calc_PRFplus(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual page for crypto_krb5_calc_PRFplus(9) β€” yes the title and the manual name are both right there, we're being thorough πŸ’–


🌸 NAME 🌸

crypto_krb5_calc_PRFplus β€” it calculates PRF+ for you, and the spec it's serving is [RFC4402] 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int crypto_krb5_calc_PRFplus (const struct krb5_enctype *krb5 , const
struct krb5_buffer *K , unsigned int L , const struct krb5_buffer *S ,
struct krb5_buffer *result , gfp_t gfp );

like, that's the whole signature, no cap ✨ just six args and it returns an int πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • krb5 β€” the encryption type you're gonna use, it's giving "which flavor are we doing today" πŸ’…
  • K β€” the protocol key for the pseudo-random function, the main character of the key world πŸ”‘
  • L β€” the length of the output, so you tell it exactly how much slay you want
  • S β€” the input octet string, the lil' input bestie πŸ“
  • result β€” the result buffer, and heads up it's sized to krb5->prf_len, don't skimp on it πŸ™ˆ
  • gfp β€” allocation restrictions, the vibe check for how memory gets grabbed πŸ’€

⭐ DESCRIPTION ⭐

So what it actually does: it calculates the kerberos pseudo-random function, PRF+(), and it does it by the following method:

PRF+(K, L, S) = truncate(L, T1 || T2 || .. || Tn) Tn = PRF(K, n || S)
[rfc4402 sec 2]

that's it, that's the formula, [rfc4402 sec 2] said it first and we're just honoring the icon πŸ‘‘ literally just truncating L bytes off the concatenation of T1 through Tn, where each Tn is PRF(K, n || S). obsessed. no notes. periodt 🌈


πŸ”₯ SEE ALSO πŸ”₯

go read those too bestie, they're the friend group 🫢


πŸ’€ real talk though β€” result literally has to be sized to krb5->prf_len, that's not a suggestion, that's the assignment.

so yeah! that's the page πŸ’– it came from ./crypto/krb5, it's dated October 2026, and honestly? the whole thing ate. mwah πŸ˜­βœ¨πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from