crypto_akcipher_maxsize(9)
π 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 withcrypto_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 π
- Kernel file
./include/crypto/akcipher.hπ struct akcipher_request(9)struct crypto_akcipher(9)struct akcipher_alg(9)Generic Public Key Cipher API(9)crypto_alloc_akcipher(9)crypto_free_akcipher(9)akcipher_request_alloc(9)akcipher_request_free(9)akcipher_request_set_callback(9)akcipher_request_set_crypt(9)crypto_akcipher_encrypt(9)crypto_akcipher_decrypt(9)crypto_akcipher_sync_encrypt(9)crypto_akcipher_sync_decrypt(9)crypto_akcipher_set_pub_key(9)crypto_akcipher_set_priv_key(9)
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
- 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