skcipher_request_set_crypt(9)
π skcipher_request_set_crypt(9) π
okay so this is a page straight out of the Kernel API Manual (yes, the kernel has lore too πΈ), and it's all about skcipher_request_set_crypt β the function that tells your symmetric-cipher request where the data actually lives. bestie, it's giving "matchmaker for buffers" and I'm obsessed π«Ά
β¨ NAME β¨
skcipher_request_set_crypt β set data buffers π
π¦ SYNOPSIS π¦
void skcipher_request_set_crypt (struct skcipher_request *req , struct
scatterlist *src , struct scatterlist *dst , unsigned int cryptlen ,
void *iv );
π ARGUMENTS π
reqβ the request handle. your main character struct πsrcβ source scatter / gather list. where the bytes are coming from πdstβ destination scatter / gather list. where the bytes are going to π―cryptlenβ number of bytes to process fromsrc. literal count, no cap π’ivβ the IV for the cipher operation, and it must comply with the IV size defined bycrypto_skcipher_ivsizeβ οΈ (not negotiable, she has a size and she sticks to it π )
β DESCRIPTION β
So what does it actually do? This function allows setting of the source data and destination data scatter / gather lists. that's the whole gig, and she does it flawlessly β¨
Now here's the important part, so listen up π§:
- For an encryption operation, the source is treated as the plaintext and the destination is the ciphertext π
- For a decryption operation, the use is reversed β the source is the ciphertext and the destination is the plaintext π
it's giving "same function, two moods" and honestly? iconic ππ
ngl, if you mix upsrcanddston a decrypt, that's a vibe check you will fail π keep the direction straight!
πΈ SEE ALSO πΈ
Kernel file ./include/crypto/skcipher.h β and also literally all of these besties:
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)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)
and that's the tea β this page lives in ./include/crypto, dated October 2026 π go set those buffers, bestie, you got this fr fr πβ¨π
π¦ 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