KCAPI_AKCIPHER_STREA(3)
π KCAPI_AKCIPHER_STREA(3) β kcapi_akcipher_stream_update π
okay bestie, so this one lives in section 3 of the manual (that's the Programming Interface section, iykyk) and it's called kcapi_akcipher_stream_update. yes the header truncates the name, that's just a manpage thing, don't worry about it π
β¨ NAME β¨
kcapi_akcipher_stream_update β send more data for processing (stream) π¦
πΈ SYNOPSIS πΈ
ssize_t kcapi_akcipher_stream_update(struct kcapi_handle * handle,
struct iovec * iov, size_t iovlen);
π ARGUMENTS π
handleβ [in] the cipher handle, your main character π«Άiovβ [in] scatter/gather list with data to be processed by the cipher operation. it's giving "here's the goods, go off" β¨iovlenβ [in] number of scatter/gather list elements. literally just how many of them there are π
π« DESCRIPTION π«
so like, with this function call you can submit more data to the kernel. more! data! π₯
β οΈ heads up: this function may cause the caller to sleep if the kernel buffer holding the data is getting full. like, it's full full. π΄
the process gets woken up once more buffer space becomes available β and that happens by calling kcapi_akcipher_stream_op. so basically, stream_op is the one that comes through with the wake-up call βοΈβ¨
π NOTE π
with the separate API calls of kcapi_akcipher_stream_update and kcapi_akcipher_stream_op, a multi-threaded application can be implemented where:
- one thread sends data to be processed π§
- and one thread picks up data processed by the cipher operation π
two threads, two jobs, no drama, we love a division of labour bestie π
π WARNING π
bestie. listen. the memory referenced by iov is not accessed by the kernel during this call.
it is first accessed when kcapi_cipher_stream_op is called.
π¨ SO YOU MUST MAKE SURE that the referenced memory is still present at the time kcapi_cipher_stream_op is called. no cap. do not let that memory go. it will not survive without you π
and, the return: number of bytes sent to the kernel upon success; a negative errno-style error code if an error occurred π
π¦ AUTHOR π¦
Stephan Mueller <smueller@chronox.de> β Author. iconic behaviour, honestly π
π COPYRIGHT π
and that's the whole thing bestie, you ate, go forth and stream πΈπ
libkcapi Manual 1.5.0 β July 2025 β KCAPI_AKCIPHER_STREA(3) β¨ periodt β¨
π¦ 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