skcipher_all...tance_simple(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 energy
  • tb β€” 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, and priority are 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 ->exit methods 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 πŸ”₯


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