crypto_krb5_get_mic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_krb5_get_mic(9)

okay bestie, welcome to the Kernel API Manual ✨ this one's about slapping a Kerberos integrity checksum onto your buffer, and honestly? it ate.


πŸŽ€ NAME

crypto_krb5_get_mic β€” apply that Kerberos integrity checksum, periodt πŸ’…


🌸 SYNOPSIS

ssize_t crypto_krb5_get_mic (const struct krb5_enctype *krb5 , struct
crypto_shash *shash , const struct krb5_buffer *metadata , struct
scatterlist *sg , unsigned int nr_sg , size_t sg_len , size_t
data_offset , size_t data_len );

✨ ARGUMENTS

  • krb5 β€” the encoding to use, like literally which flavor of Kerberos we're vibing with πŸ¦‹
  • shash β€” the keyed hash to use, this is the main character of the hashing operation πŸ‘‘
  • metadata β€” metadata to add into the hash before adding the data, order matters bestie πŸŽ€
  • sg β€” scatterlist defining the crypto buffer, that's the whole spread 🫢
  • nr_sg β€” the number of elements in sg, count 'em ⭐
  • sg_len β€” the size of the buffer, yes the whole thing πŸ’–
  • data_offset β€” the offset of the data in the sg buffer, where the actual goods start πŸ”₯
  • data_len β€” the length of the data, how much of it there is 🌸

πŸ’œ DESCRIPTION

Using the specified Kerberos encoding, calculate and insert an integrity checksum into the buffer ✨ that's the whole gig, no cap.

🚨 real talk: the buffer must include space for the checksum at the front. like, you gotta leave room for it upfront or this is not gonna go how you want πŸ’€

On success it returns the size of the secure blob 🌈 β€” and if it doesn't slay, here's the receipts:

  • -ENOMEM β€” allocation failure, the allocator said no πŸ™ˆ
  • -EFAULT β€” insufficient space, there's just not enough room 😭
  • -EMSGSIZE β€” the gap for the checksum is too short, awkward πŸ’€

Other errors may also be returned from the crypto layer, so don't come for this manpage if the crypto layer has its own opinions 🧚


πŸ¦‹ SEE ALSO

Kernel file ./crypto/krb5/krb5_api.c, plus the whole friend group:


and that's the tea, bestie πŸ“ this little icon lives in ./crypto/krb5 and was stamped October 2026 β€” go forth and checksum responsibly, ily πŸ’–πŸ«Ά

πŸ“¦ where this page comes from