KCAPI_AKCIPHER_STREA(3)
π KCAPI_AKCIPHER_STREA(3) π
okay bestie, you found the page for kcapi_akcipher_stream_init_sgn β that's a mouthful, i know β and it lives in the Programming Interface section of the manual. it's part of libkcapi Manual 1.5.0, dated July 2025, and yes we're gonna get into it together. grab a snack. π
β¨ NAME β¨
kcapi_akcipher_stream_init_sgn β kick off a signing operation, but make it a stream. π
β¨ SYNOPSIS β¨
ssize_t kcapi_akcipher_stream_init_sgn(struct kcapi_handle * handle,
struct iovec * iov,
size_t iovlen);
β¨ ARGUMENTS β¨
handleβ [in] the cipher handle. your main character. πiovβ [in] a scatter/gather list holding the data you wanna sign. if you're passing an array of iov entries, this points at the first one. howiovactually gets used? that's asendmsg(2)situation, go read that for the deets. also: this pointer can totally beNULLif you just don't have any data to sign at the moment of the call. no pressure, no data, no problem. π«Άiovlenβ [in] how many scatter/gather list elements you've got. β οΈ and listen: ifiovisNULL, this value must be zero. fr fr, don't be out here passingNULLwith a nonzero length. π
β¨ DESCRIPTION β¨
so this call starts a stream signing operation. think of it as opening the group chat before everyone starts yapping. π
once you're in, you can hit kcapi_akcipher_stream_update multiple times in a row to keep feeding more plaintext in to be signed. but the last time you send data, you have to use kcapi_akcipher_stream_update_last β that's the "okay that's everything, send it" move. no cap. πΈ
meanwhile the kernel is over there buffering your input until kcapi_akcipher_stream_op comes along and picks up the signed data. and the second that plaintext gets signed during kcapi_cipher_stream_op? it's gone from the kernel buffer. removed. ghosted. literally. π¦
and here's the cute part: you can mix kcapi_akcipher_stream_update and kcapi_akcipher_stream_op calls however you want β even from multiple threads in the same application. multithreaded chaos is allowed, it's giving teamwork. π₯
as for what you get back: on success it returns the number of bytes sent to the kernel, and if something goes sideways you get a negative errno-style error code. π
β¨ AUTHOR β¨
Stephan Mueller <smueller@chronox.de> β the author. iconic behavior honestly. π
β¨ COPYRIGHT β¨
that's the whole page, babe. π
okay so that's the tea β β and just so you have the receipts: this is the libkcapi Manual 1.5.0, July 2025 edition, page KCAPI_AKCIPHER_STREA(3). go sign something. slay. πβ¨
π¦ 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