crypto_skcipher_encrypt(9)
π crypto_skcipher_encrypt β bestie, we're ENCRYPTING
okay so this is a page straight out of the Kernel API Manual (yes, kernel docs can be cute, we contain multitudes) and it's about crypto_skcipher_encrypt. it does exactly what it says on the tin: encrypts plaintext. that's it. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
int crypto_skcipher_encrypt (struct skcipher_request *req );
literally one function, one pointer, one int coming back at you. we love a minimal icon. π
π¦ ARGUMENTS π¦
reqβ a reference to theskcipher_requesthandle that holds all the info needed to actually perform the cipher operation. it's giving "everything you need is in the bag already" energy. π
π DESCRIPTION π
so here's the tea: this function encrypts plaintext data using that skcipher_request handle. π₯
and if you're sitting there like "ok but how do i even fill that thing with data??" β no worries bestie, that whole situation is discussed with the skcipher_request_* functions. go read those, they're the main characters of that particular storyline. πβ¨
π RETURN π
0β slay, the cipher operation was successful π< 0β nope, an error occurred π (negative number = the vibe check failed)
π SEE ALSO π
okay this list is long but we're getting through it together, iykyk:
- Kernel file
./include/crypto/skcipher.hβ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_decrypt(9)β the reverse icon πͺ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)skcipher_request_set_crypt(9)
friendly reminder bestie: the_skcipherand_lskcipherfamilies are two different friend groups and you should not mix them up just because they hang out in the same header file. π
and that's the whole page!! π«Ά this lil gem lives in ./include/crypto, dated October 2026, and it's part of the Kernel API Manual β go forth and encrypt responsibly, mwah ππ§ββοΈ
π¦ 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