crypto_lskcipher_decrypt(9)
π crypto_lskcipher_decrypt(9) β Kernel API Manual, bestie edition π
okay so this is a page from the Kernel API Manual, and the star of the show is crypto_lskcipher_decrypt β the little function that could, and does, decrypt stuff. she's giving "quiet main character energy" fr fr. let's get into it π¦
β¨ NAME β¨
crypto_lskcipher_decrypt β decrypt ciphertext. that's it. that's the whole vibe. π«Ά
πΈ SYNOPSIS πΈ
int crypto_lskcipher_decrypt (struct crypto_lskcipher *tfm , const u8
*src , u8 *dst , unsigned len , u8 *siv );
look at her. iconic signature, no notes. π
π§ ARGUMENTS π§
tfmβ the lskcipher handle. your girl, your cipher, your whole personality. it's the thing you're holding when you call this.srcβ source buffer. the ciphertext lives here. this is the "before" pic. πΈdstβ destination buffer. where the decrypted goodness goes. the "after" pic, slay.lenβ number of bytes to process. literally just how many bytes we're cooking with. π₯sivβ IV + state for the cipher operation. bestie, read this part twice: the length of the IV must comply with the IV size defined bycrypto_lskcipher_ivsize. and then, right after the IV, the IV is followed with a buffer with the length as specified bycrypto_lskcipher_statesize. so it's IV then state, back to back, no gaps, no drama. π
π DESCRIPTION π
Decrypt ciphertext data using the lskcipher handle. that's the whole job description. she takes your ciphertext, she uses the lskcipher handle you handed her, and she gives you back plaintext. no cap. β
π RETURN π
>=0if the cipher operation was successful β and if it's positive, then this many bytes have been left unprocessed. so like, positive = it worked but there's leftovers, noted. π< 0if an error occurred. we don't love that, but we respect the transparency.
fr fr check the return value. positive means unprocessed bytes are still sitting there, and negative means something went sideways β don't just assume it ate. π
π SEE ALSO π
Kernel file ./include/crypto/skcipher.h, plus the whole extended friend group:
struct skcipher_request(9)struct skcipher_alg(9)struct lskcipher_alg(9)Symmetric Key Cipher API(9)crypto_alloc_skcipher(9)crypto_alloc_lskcipher(9)crypto_free_skcipher(9)crypto_free_lskcipher(9)crypto_has_skcipher(9)crypto_skcipher_ivsize(9)crypto_lskcipher_ivsize(9)crypto_skcipher_blocksize(9)crypto_lskcipher_blocksize(9)crypto_skcipher_chunksize(9)crypto_lskcipher_chunksize(9)crypto_skcipher_statesize(9)crypto_lskcipher_statesize(9)crypto_skcipher_setkey(9)crypto_lskcipher_setkey(9)crypto_skcipher_reqtfm(9)crypto_skcipher_encrypt(9)crypto_skcipher_decrypt(9)crypto_skcipher_export(9)crypto_skcipher_import(9)crypto_lskcipher_encrypt(9)Symmetric Key Cipher Request Handle(9)crypto_skcipher_reqsize(9)skcipher_request_set_tfm(9)skcipher_request_alloc(9)skcipher_request_free(9)skcipher_request_set_callback(9)skcipher_request_set_crypt(9)
okay that's the page!! source is ./include/crypto, dated October 2026, and it's all about crypto_lskcipher_decrypt(9). go forth and decrypt responsibly, bestie πβ¨π
π¦ 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