KCAPI_AKCIPHER_INIT(3)
β¨ KCAPI_AKCIPHER_INIT(3) β¨
okay bestie, we're in the libkcapi corner of the man pages, and this one is literally just about β¨manifestingβ¨ an asymmetric cipher handle. it's giving "step one of a whole ritual" energy and honestly? iconic. π
πΈ NAME πΈ
kcapi_akcipher_init β initialize cipher handle π
π¦ SYNOPSIS π¦
int kcapi_akcipher_init(struct kcapi_handle ** handle,
const char * ciphername, uint32_t flags);
π ARGUMENTS π
handleβ [out] the cipher handle, which gets filled in during the call. you hand over a pointer-to-pointer and it comes back with a whole personality π«Άciphernameβ [in] the kernel crypto API cipher name, exactly as it's specified in/proc/crypto. so like, go look at what's in there first, don't just freestyle it πflagsβ [in] flags that specify the type of cipher handle you want. it's the vibe check for what kind of handle you're getting β¨
π DESCRIPTION π
so this function does the initialization of an asymmetric cipher handle and sets up the connection to the kernel. no cap, that's the whole job β it's the "hi bestie, we're linked now" moment. π₯
on success, a pointer to a kcapi_handle object is returned in *handle. and listen β once you've got that handle, you should call kcapi_akcipher_destroy afterwards to free the resources. it's the responsible thing, the main character thing, the cleanup after yourself thing. don't leave it hanging π
it returns:
0upon success β slay β¨-ENOENTβ the algorithm is not available π-EOPNOTSUPPβ theAF_ALGfamily is not available π-EINVALβ the accept syscall failed π-ENOMEMβ the cipher handle cannot be allocated π§οΈ
π AUTHOR π
Stephan Mueller <smueller@chronox.de> Author. π«‘
π COPYRIGHT π
that's the whole page, bestie β go forth and initialize responsibly πβ¨
libkcapi Manual 1.5.0 Β· July 2025 β mwah, 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