crypto_alloc_skcipher(9)
π crypto_alloc_skcipher(9) π
okay so this is a page straight out of the Kernel API Manual, bestie β we're talking kernel crypto internals, and honestly? it's giving main character energy. stick with me π«Ά
β¨ NAME β¨
crypto_alloc_skcipher β allocate symmetric key cipher handle
like, you're literally getting yourself a handle for a symmetric key cipher. that's the whole vibe π
πΈ SYNOPSIS πΈ
struct crypto_skcipher * crypto_alloc_skcipher (const char *alg_name ,
u32 type , u32 mask );
look at her. iconic signature. no cap, write it exactly like that β¨
π ARGUMENTS π
alg_nameβ this is thecra_name/ name or thecra_driver_name/ driver name of the skcipher cipher. so like, either name works, you just gotta tell her which cipher you want π¦typeβ specifies the type of the cipher. yes ma'am, the type πmaskβ specifies the mask for the cipher. that's the mask, bestie, that's it π
π₯ DESCRIPTION π₯
So what does she actually do? She allocates a cipher handle for an skcipher. That's the whole plot π
The returned struct crypto_skcipher is the cipher handle that is required for any subsequent API invocation for that skcipher. Translation: you literally cannot do the follow-up calls without her. she's the key to the whole thing π
β RETURN β
- allocated cipher handle in case of success β slay, you got your handle π
IS_ERRis true in case of an error β and thenPTR_ERRreturns the error code, so check it, fr fr π
bestie please actually check the return value.IS_ERRtrue means error, andPTR_ERRhands you the error code. don't skip the vibe check π
π SEE ALSO π
Kernel file ./include/crypto/skcipher.h, plus this whole little family right here:
struct skcipher_request(9)struct skcipher_alg(9)struct lskcipher_alg(9)Symmetric Key Cipher API(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)skcipher_request_set_crypt(9)
and that's the whole page, periodt π
this lil gem lives in ./include/crypto and it's dated October 2026, and the page itself is crypto_alloc_skcipher(9) β go forth and allocate 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