crypto_krb5_check_data_len(9)
π crypto_krb5_check_data_len β a Kernel API Manual moment π
okay so bestie, we're in the (9) section of the Kernel API Manual and today's main character is crypto_krb5_check_data_len. yes it's a mouthful, no you don't have to say it out loud. π
β¨ NAME β¨
crypto_krb5_check_data_len β literally just checks that a message is big enough π¦
πΈ SYNOPSIS πΈ
int crypto_krb5_check_data_len (const struct krb5_enctype *krb5 , enum
krb5_crypto_mode mode , size_t len , size_t min_content );
like, that's the whole vibe. four args, one int back. slay. π
π ARGUMENTS π
krb5β the encoding to use. this is the encoding, the one, the icon. πmodeβ mode of operation, i.e. what kind of mood we're in. π₯lenβ the length of the secure blob.min_contentβ the minimum length of the content inside the blob. so like, the blob has to be at least big enough to hold this much actual content, plus whatever extra nonsense the crypto layer adds. π
π DESCRIPTION π
so here's the tea β β this function checks that a message is large enough to hold whatever bits the encryption type wants to glue on (that's the nonce and the checksum, iykyk) plus a minimum amount of content.
that's it. that's the function. it's giving bouncer at the club checking your ID. no min_content? no entry. π
β RETURN β
0β successful, we ate, everything's fine β¨-EBADMSGβ the message is too short π-EINVALβ the mode is unsupported π
ngl if you get -EINVAL that's a you problem, the mode you passed isn't a thing.
π SEE ALSO π
kernel file ./crypto/krb5/krb5_api.c β and the whole friend group:
crypto_krb5_find_enctype(9)crypto_krb5_how_much_buffer(9)crypto_krb5_how_much_data(9)crypto_krb5_where_is_the_data(9)crypto_krb5_prepare_encryption(9)crypto_krb5_prepare_checksum(9)crypto_krb5_encrypt(9)crypto_krb5_decrypt(9)crypto_krb5_get_mic(9)crypto_krb5_verify_mic(9)
like a whole squad fr fr π«Ά
okay that's the page!! this one lives in ./crypto/krb5 and it's dated October 2026 β so yes, we're reading the future bestie π§, periodt. go check those lengths, ily, bye ππ¦πΈ
π¦ 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