KCAPI_AEAD_SETASSOCL(3)

✨ kcapi_aead_setassoclen β€” bestie, we're setting the auth data size πŸ’…

okay so this is a page from the libkcapi manual (section 3, the library-functions section, iykyk), and the function we're obsessing over today is kcapi_aead_setassoclen β€” literally just "set authentication data size" and nothing more, no cap.


🌸 SYNOPSIS 🌸

void kcapi_aead_setassoclen(struct kcapi_handle * handle,
                            size_t assoclen);

that's it, that's the whole vibe πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] the cipher handle, aka your main character ✨
  • assoclen β€” [in] the length of associated data length, fr fr πŸ“

πŸ’– DESCRIPTION πŸ’–

so the associated data? it gets retained in the cipher handle β€” like it literally lives there, no cap 🫢. and then, during initialization of a cipher handle, it gets sent to the kernel. periodt.

now here's the part you need to know, bestie: the kernel cipher implementations may verify the appropriateness of the authentication data size πŸ‘€, and they may return an error during initialization if that authentication size is not considered appropriate. so like… if the kernel isn't feeling it, initialization is not giving, and you get an error. slay responsibly πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de> β€” Author. iconic behaviour, honestly πŸŽ€


that's a wrap on the libkcapi Manual 1.5.0, dated July 2025 β€” go forth and set those assoc lengths, you absolute legend πŸ’œβœ¨πŸŒΈ

πŸ“¦ where this page comes from