KCAPI_AKCIPHER_SIGN_(3)
π KCAPI_AKCIPHER_SIGN_AIO β bestie's guide to signing data π
okay so this is a page from the libkcapi manual, section 3 (that's the programming interface girlies, iykyk). it's all about kcapi_akcipher_sign_aio and honestly? it's giving β¨one shotβ¨ energy.
β¨ NAME β¨
kcapi_akcipher_sign_aio β sign data (asynchronous one shot) π
πΈ SYNOPSIS πΈ
ssize_t kcapi_akcipher_sign_aio(struct kcapi_handle * handle,
struct iovec * iniov,
struct iovec * outiov, size_t iovlen,
int access);
π ARGUMENTS π
handleβ [in] your cipher handle, the main character of this whole situation π«Άiniovβ [in] head of the scatter-gather list array holding the plaintext, so like, the stuff going in πoutiovβ [out] head of the scatter-gather list of the destination buffers filled with ciphertext, aka where the signed stuff lands π¦iovlenβ [in] number of scatter-gather list entries, count 'em bestie π’accessβ [in] the kernel access type, and you've got choices:KCAPI_ACCESS_HEURISTICβ use internal heuristic for fastest kernel access (the "let the algorithm pick for me" vibe π§)KCAPI_ACCESS_VMSPLICEβ use vmsplice accessKCAPI_ACCESS_SENDMSGβ sendmsg access
π DESCRIPTION π
The individual scatter-gather list entries are processed with separate invocations of the the given cipher. (yes, "the the" β that's literally what it says, no cap π)
The memory should be aligned at the page boundary using posix_memalign(sysconf(_SC_PAGESIZE)). If it is not aligned at the page boundary, the vmsplice call may not send all data to the kernel.
β οΈ okay this one matters: page-boundary alignment is not optional vibes, it's a whole thing. misaligned memory + vmsplice = the kernel might not get all your data. not slay. π
return number of bytes signed upon success; a negative errno-style error code if an error occurred. so like, if you get a negative number back, something went wrong bestie β that's your error right there π
π AUTHOR π
Stephan Mueller <smueller@chronox.de>
- Author. (he did that. periodt. π)
π COPYRIGHT π
and that's the whole page, fr fr. this was libkcapi Manual 1.5.0, dated July 2025 β shoutout to the KCAPI_AKCIPHER_SIGN_(3) girlies, go sign something iconic ππ
π¦ 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