skcipher_all...tance_simple(9)
π skcipher_alloc_instance_simple(9) π
okay so first things first β welcome to the Kernel API Manual, bestie π this page is literally called skcipher_all...tance_simple(9) (yes the title is truncated like that, no I did not do it, the manual did π) and it's gonna teach you how to spin up an instance for a simple block cipher mode. let's get into it β¨
πΈ NAME πΈ
skcipher_alloc_instance_simple β allocate an instance of a simple block cipher mode, periodt π
π¦ SYNOPSIS π¦
struct skcipher_instance * skcipher_alloc_instance_simple (struct
crypto_template *tmpl , struct rtattr **tb );
like, that's the whole signature. she's an icon, she's a function, she returns a pointer to a struct skcipher_instance π
β¨ ARGUMENTS β¨
tmplβ the template being instantiated π§ that's the thing you're bringing into existence, main character energytbβ the template parameters π the vibe check args, if you will
π DESCRIPTION π
okay so what this does: it allocates an skcipher_instance for a simple block cipher mode of operation β think cbc or ecb, the classics π
here's the tea on what the instance context gets:
- it will have just a single
crypto_spawn, and that spawn is for the underlying cipher π«Ά one spawn, no more, that's it - the
{min,max}_keysize,ivsize,blocksize,alignmask, andpriorityare all set from the underlying cipher π₯
but β and this is the good part β those can all be overridden if needed π so you're not locked in, you have options, you have range.
also:
- the tfm context defaults to
skcipher_ctx_simple - and default
->setkey,->init, and->exitmethods are installed β¨
it's giving "batteries included but customizable." obsessed.
β RETURN β
returns a pointer to the new instance, or an ERR_PTR π (iykyk β check that thing before you use it, fr fr).
β οΈ heads up bestie: the caller still needs to register the instance. this function does not do that for you. the allocation is yours, the registration is also yours. no cap. π
π₯ SEE ALSO π₯
- Kernel file
./crypto/skcipher.c skcipher_walk_done(9)
and that's the page!! mwah π this little legend lives in ./crypto, dated October 2026, and it's filed under skcipher_all...tance_simple(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