crypto_akcip...set_priv_key(9)
π crypto_akcipher_set_priv_key β the manual, but make it make sense π
okay bestie so you found yourself in the kernel crypto section, section 9 of the manual, and the page you're on is literally crypto_akcip...set_priv_key(9) β¨ yes the title got truncated, she's mysterious like that. anyway. this one's about handing a private key to an akcipher transform. it's giving "trust me bro, the algorithm knows what to do with it." let's go π«Ά
β¨ NAME β¨
crypto_akcipher_set_priv_key β invoke the set private key operation π
πΈ SYNOPSIS πΈ
int crypto_akcipher_set_priv_key (struct crypto_akcipher *tfm , const
void *key , unsigned int keylen );
π ARGUMENTS π
tfmβ the tfm handle π¦ like, your transform object, the main character of this whole callkeyβ a BER encoded private key, then the algo OID, thenparamlen, then the BER encoded parameters. yes all of it, in that order, one blob, no cap πkeylenβ the length of the key. and bestie, listen: this is not including other data β so don't be out here counting the OID and params in this number
π DESCRIPTION π
so what this function actually does: it invokes the algorithm specific set key function π and that per-algorithm function is the one that knows how to decode and interpret the encoded key and the parameters. it's literally passing the vibes down to the specialist. iykyk π«
π RETURN π
zeroon success π slay- an error code in case of error π that's it, that's the deal
π§ SEE ALSO π§
kernel file ./include/crypto/akcipher.h, plus the whole friend group:
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_decrypt(9)crypto_akcipher_sync_encrypt(9)crypto_akcipher_sync_decrypt(9)crypto_akcipher_set_pub_key(9)β the public-key sibling, go say hi
lowkey a reminder that key is BER encoded β the decoding is the algorithm's whole job, not yours. you're just the messenger π§ββοΈ
and that's the page, bestie!! π sign-off time: this lil beauty lives in ./include/crypto, dated October 2026, and answers to the name crypto_akcip...set_priv_key(9) β periodt π
π
π¦ 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