crypto_akcipher_decrypt(9)
π crypto_akcipher_decrypt β bestie, it's decryption time
okay so real talk, this is a page from the Kernel API Manual and the star of the show is crypto_akcipher_decrypt(9). It's a kernel function, it decrypts stuff with a public key algorithm, and honestly? iconic. Let's get into it π«Ά
β¨ NAME β¨
crypto_akcipher_decrypt β the one that kicks off the public key decrypt operation π«
π¦ SYNOPSIS π¦
int crypto_akcipher_decrypt (struct akcipher_request *req );
like, yes, that's the whole signature. short and slay β¨
π ARGUMENTS π
reqβ the asymmetric key request π this is the little container that holds all the deets for the operation, and you do have to hand it over.
πΈ DESCRIPTION πΈ
So what does it actually do? It invokes the specific public key decrypt operation for a given public key algorithm. That's it. That's the vibe. it's giving "middle manager of the crypto world" β it doesn't do the math itself, it just makes sure the right algorithm's decrypt routine gets called π
lowkey the whole point: you bring the req, it routes the decrypt. no cap π
β RETURN β
- zero on success π like, we ate and left no crumbs
- an error code in case of error π yes bestie, if it goes wrong you get an error code back. check it. always check it.
π₯ SEE ALSO π₯
the whole friend group, fr fr β go read these too:
- Kernel file
./include/crypto/akcipher.hπ struct akcipher_request(9)struct crypto_akcipher(9)struct akcipher_alg(9)Generic Public Key Cipher API(9)crypto_alloc_akcipher(9)crypto_free_akcipher(9)akcipher_request_alloc(9)akcipher_request_free(9)akcipher_request_set_callback(9)akcipher_request_set_crypt(9)crypto_akcipher_maxsize(9)crypto_akcipher_encrypt(9)crypto_akcipher_sync_encrypt(9)crypto_akcipher_sync_decrypt(9)crypto_akcipher_set_pub_key(9)crypto_akcipher_set_priv_key(9)
π reminder: the return value is not decorative. zero means slay, anything else means go read the error code. don't @ me.
and that's the page! this little gem lives in ./include/crypto and it's dated October 2026 π mwah, go decrypt something gorgeous π§ββοΈπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms