crypto_akcipher_maxsize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_akcipher_maxsize(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ this is crypto_akcipher_maxsize(9) and it's honestly a tiny little legend β€” it tells you how big your output buffer needs to be. that's it. that's the whole vibe. πŸŽ€


✨ NAME ✨

crypto_akcipher_maxsize β€” get the len for your output buffer 🫢


🌸 SYNOPSIS 🌸

unsigned int crypto_akcipher_maxsize (struct crypto_akcipher *tfm );

like, that's the whole signature. short king energy πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tfm β€” your AKCIPHER tfm handle, and it's gotta be one you allocated with crypto_alloc_akcipher. no borrowing from your mutuals, allocate your own πŸ’–

πŸŽ€ DESCRIPTION πŸŽ€

so the function returns the dest buffer size required for a given key ✨ that's the whole point. it's a size-checker, a little "hey how much room do i need" moment.

now the part you cannot skip, bestie, because it's giving ⚠️:

Function assumes that the key is already set in the transformation.

and like β€” if you call this without a setkey, or after a setkey that failed? you will end up in a NULL dereference. πŸ’€ not cute. not the move. that's a crash, fr fr. so set your key first, check you didn't fail, and then come ask for the maxsize. periodt.


πŸ’œ SEE ALSO πŸ’œ

like literally the whole akcipher friend group, go say hi 🌈


and that's the whole page babes β€” brought to you by the fine people at ./include/crypto 🌸, dropping October 2026 (yes, future girlie πŸ’…), and this was crypto_akcipher_maxsize(9) 🧚 stay safe, set your keys, and don't NULL-deref on main πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from