crypto_lskcipher_encrypt(9)
β¨ NAME β¨
crypto_lskcipher_encrypt β encrypt plaintext π
okay so bestie, welcome to the crypto_lskcipher_encrypt(9) page from the Kernel API Manual. This is the function that handles the actual plaintext encryption, and yes she's iconic for it. π
π¦ SYNOPSIS π¦
int crypto_lskcipher_encrypt (struct crypto_lskcipher *tfm , const u8 *src , u8 *dst , unsigned len , u8 *siv );
π ARGUMENTS π
tfmβ the lskcipher handle. That's your main-character cipher object, periodt.srcβ source buffer. This is where the plaintext is sitting.dstβ destination buffer. This is where the encrypted output goes.lenβ number of bytes to process. Literally the count of bytes invited to the party.sivβ IV + state for the cipher operation. The length of the IV must comply with the IV size defined bycrypto_lskcipher_ivsize. The IV is then followed with a buffer with the length as specified bycrypto_lskcipher_statesize. Encrypt plaintext data using the lskcipher handle. So yeah: IV first, state buffer right after it, and those length rules are not optional, bestie. π«Ά
π RETURN π
>=0 if the cipher operation was successful. If it's positive, then this many bytes have been left unprocessed. < 0 if an error occurred. Like, negative is the "something went wrong" vibe, and positive is "we did it but some bytes are still outside the club." π
π SEE ALSO π
okay the reference list is long and honestly she ate. Start with the Kernel file ./include/crypto/skcipher.h, then the whole squad:
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_decrypt(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)
cute sign-off: this page is from the Kernel API Manual, lives under the source ./include/crypto, and is stamped October 2026 with the name crypto_lskcipher_encrypt(9) on the label. π Go encrypt something iconic, 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