KCAPI_AKCIPHER_STREA(3)
πΈ KCAPI_AKCIPHER_STREA(3) πΈ
okay bestie, this one lives in the Programming Interface section of the manual, and it's all about kicking off a decryption stream. let's get into it π
β¨ NAME β¨
kcapi_akcipher_stream_init_dec β start an decryption operation (stream)
π SYNOPSIS π
ssize_t kcapi_akcipher_stream_init_dec(struct kcapi_handle * handle,
struct iovec * iov,
size_t iovlen);
π ARGUMENTS π
handleβ [in] the cipher handle, your little main character π«Άiovβ [in] scatter/gather list with data to be decrypted. if you're passing in an array of iov entries, this points at the first one. seesendmsg(2)for the deets on howiovis meant to be used π this pointer can legit beNULLif there's no data to be decrypted available at the point of the call.iovlenβ [in] number of scatter/gather list elements. and listen: ifiovisNULL, this value must be zero. no cap. π«
π DESCRIPTION π
A stream decryption operation gets started with this call, periodt. then you can hit up kcapi_akcipher_stream_update multiple times in a row to send more plaintext data to be decrypted. the last invocation that supplies data has to go through kcapi_akcipher_stream_update_last, that's the rule π
meanwhile the kernel is just sitting there buffering the input until kcapi_akcipher_stream_op picks up the encrypted data. once the plaintext is decrypted during the kcapi_cipher_stream_op, it's removed from the kernel buffer β gone, bye, out of the group chat π
and here's the cute part: the function calls of kcapi_akcipher_stream_update and kcapi_akcipher_stream_op can be mixed, even by multiple threads of an application. multitasking queen energy fr fr π
β¨
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.
π COPYRIGHT π
and that's the whole page bestie, slay π
libkcapi Manual 1.5.0 β July 2025 π¦
that's the sign-off, mwah π go decrypt something gorgeous β¨
π¦ 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