crypto_krb5_decrypt(9)
π crypto_krb5_decrypt(9) β like, the Kernel API Manual page, bestie
okay so you're in the Kernel API Manual and the page is crypto_krb5_decrypt(9). buckle up π
β¨ NAME β¨
crypto_krb5_decrypt β validate and remove Kerberos encryption and integrity. that's the whole vibe. it checks the crypto, then yeets it off your buffer. π¦
πΈ SYNOPSIS πΈ
int crypto_krb5_decrypt (const struct krb5_enctype *krb5 , struct
crypto_aead *aead , struct scatterlist *sg , unsigned int nr_sg , size_t
*_offset , size_t *_len );
π«Ά ARGUMENTS π«Ά
krb5β the encoding to use. like, which flavour of Kerberos we're doing today β¨aeadβ the keyed crypto object to use. it's the one holding the key, very main character energy πsgβ scatterlist defining the crypto buffer. that's the actual memory, sliced up π«nr_sgβ the number of elements insg. count 'em π_offsetβ offset of the secure blob in the buffer; gets updated to the data offset. so it comes in as one thing and leaves as another, glow-up fr π_lenβ the length of the secure blob; gets updated to the data length. same deal, she changes too π¦
π DESCRIPTION π
so using the specified Kerberos encoding, this thing checks and removes the integrity checksum and decrypts the secure region, stripping off the confounder. yes, the confounder. it's giving "the filler bits before your actual data" and we are NOT keeping her π§
if it's successful, _offset and _len are updated to outline the region in which the data plus the trailing padding are stored. lowkey important: the caller is responsible for working out how much padding there is and removing it. that's on YOU, bestie β this function hands you the region and dips π
returns 0 if successful, and -ENOMEM on an allocation failure. it sets *_error_code and returns -EPROTO if the data cannot be parsed, or -EBADMSG if the integrity checksum doesn't match (yes, the original page has a stray ) there, we're keeping the lore π€). other errors may also be returned from the crypto layer β so like, don't assume these are the only ones, okay? π
ngl this one is a whole pipeline: parse, verify, decrypt, strip, hand back. if the checksum don't match you get -EBADMSG and nothing is yours. periodt π
π SEE ALSO π
kernel file ./crypto/krb5/krb5_api.c β that's the home base π
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_check_data_len(9)crypto_krb5_prepare_encryption(9)crypto_krb5_prepare_checksum(9)crypto_krb5_encrypt(9)crypto_krb5_get_mic(9)crypto_krb5_verify_mic(9)
aaaand that's the page!! π brought to you by ./crypto/krb5, dated October 2026, filed under crypto_krb5_decrypt(9) β mwah, go decrypt something iconic βπ₯
π¦ 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