crypto_krb5_calc_PRFplus(9)
π 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 wantSβ the input octet string, the lil' input bestie πresultβ the result buffer, and heads up it's sized tokrb5->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 π₯
- Kernel file
./crypto/krb5/krb5_kdf.cβ yeah that's where the whole thing lives, iykyk π krb5_derive_Kc(9)krb5_derive_Ke(9)krb5_derive_Ki(9)
go read those too bestie, they're the friend group π«Ά
π real talk though βresultliterally has to be sized tokrb5->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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms