KCAPI_AEAD_GETDATA_I(3)

πŸ’– KCAPI_AEAD_GETDATA_I πŸ’– (that's the kcapi_aead_getdata_input one, bestie β€” section 3 of the manual, programming interface vibes)

okay so bestie, listen. you know how AEAD gives you back one big blob of bytes and somewhere in there is your tag just hiding? yeah. this function is the girl who finds it for you. no cap. πŸŽ€


✨ NAME ✨

kcapi_aead_getdata_input β€” get the pointers into input buffer

like literally, it hands you pointers into your own buffer so you don't have to do the math yourself. periodt. πŸ’…


🌸 SYNOPSIS 🌸

void kcapi_aead_getdata_input(struct kcapi_handle * handle,
                              uint8_t * encdata, size_t encdatalen,
                              int enc, uint8_t ** aad, size_t * aadlen,
                              uint8_t ** data, size_t * datalen,
                              uint8_t ** tag, size_t * taglen);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] the cipher handle, your main character ✨
  • encdata β€” [in] the data buffer that came back from the encryption operation
  • encdatalen β€” [in] how big that encryption data buffer is
  • enc β€” [in] does the output buffer hold an encryption result or a decryption result? pick a lane bestie 🫢
  • aad β€” [out] the AD buffer pointer. set it to NULL and no data pointer comes back, it's giving "i don't need it" πŸ’€
  • aadlen β€” [out] length of the AD. if aad was NULL, you get no info back. nothing. nada. 😭
  • data β€” [out] pointer to the output buffer from the AEAD encryption operation. set it to NULL and no data pointer is returned
  • datalen β€” [out] length of the data buffer. when data was NULL, no information is returned
  • tag β€” [out] the tag buffer pointer. set it to NULL and, you guessed it, no data pointer is returned πŸ™ˆ
  • taglen β€” [out] length of the tag. when tag was set to NULL, no information is returned

πŸ‘‘ DESCRIPTION πŸ‘‘

so this function is a service function β€” it exists to serve the consumer, and the consumer is you. its whole job is to locate the right ciphertext buffer offset that holds the authentication tag. iykyk, that offset is not obvious and you do not want to be guessing at it. πŸ”₯

and that's not all it does (iconic behavior honestly): it also gives you the length of the tag and the length of the ciphertext. so you walk away with your tag pointer AND the sizes. slay. 🌈


πŸ’œ AUTHOR πŸ’œ

Stephan Mueller <smueller@chronox.de> Author.

(they wrote it. we thank them. bow down πŸ‘‘)



and that's the whole page babes, go forth and find your tag 🌸 okay so this was the libkcapi Manual, version 1.5.0, dated July 2025 β€” mwah, love you, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from