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 operationencdatalenβ [in] how big that encryption data buffer isencβ [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 toNULLand no data pointer comes back, it's giving "i don't need it" πaadlenβ [out] length of the AD. ifaadwasNULL, you get no info back. nothing. nada. πdataβ [out] pointer to the output buffer from the AEAD encryption operation. set it toNULLand no data pointer is returneddatalenβ [out] length of the data buffer. whendatawasNULL, no information is returnedtagβ [out] the tag buffer pointer. set it toNULLand, you guessed it, no data pointer is returned πtaglenβ [out] length of the tag. whentagwas set toNULL, 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 π)
π COPYRIGHT π
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
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms