crypto_akcip...sync_encrypt(9)
π crypto_akcipher_sync_encrypt β from the Kernel API Manual, bestie π
okay so real talk, this is a page straight out of the Kernel API Manual and it's about one very specific little function that does exactly one thing and does it slay. no cap. let's get into it π«Ά
β¨ NAME β¨
crypto_akcipher_sync_encrypt β literally just invoke public key encrypt operation. that's the whole job. main character energy, minimal responsibilities π
πΈ SYNOPSIS πΈ
int crypto_akcipher_sync_encrypt (struct crypto_akcipher *tfm , const
void *src , unsigned int slen , void *dst , unsigned int dlen );
look at her. five params, one int return, zero drama. copy it exactly, don't freestyle it π
π¦ ARGUMENTS π¦
tfmβ the AKCIPHER tfm handle, and bestie it has to be allocated withcrypto_alloc_akcipher. no homemade handles, iykyk β¨srcβ source buffer. where the plaintext vibe lives πslenβ source length. yes you must tell her how big, she's not a mind reader πdstβ destination obuffer. (the page literally saysobufferand honestly? we respect the typo. it stays. periodt π)dlenβ destination length. again with the measurements, she likes to know πΈ
π§ DESCRIPTION π§
so what does it actually do? the function invokes the specific public key encrypt operation for a given public key algorithm. that's it. that's the tea β
it's the sync wrapper β you hand it the tfm, the source buffer + length, the destination buffer + length, and it goes and runs whichever public key algorithm is wired up underneath. lowkey iconic, highkey straightforward π
β RETURN β
zeroon success π (zero is the good number here, don't panic)- error code in case of error π
no in-between. it works or it hands you an error code. that's the vibe check.
π SEE ALSO π
all the siblings and cousins, fr fr β and the kernel file they all live in: ./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_decrypt(9)crypto_akcipher_sync_decrypt(9)crypto_akcipher_set_pub_key(9)crypto_akcipher_set_priv_key(9)
go read them too, they're all eating π₯
sign-off bestie π: this gem lives in ./include/crypto, dated October 2026, and it's filed under crypto_akcip...sync_encrypt(9) (yes the header truncates it like that, we don't make the rules π
). now go encrypt something, you absolute legend πβ¨
π¦ 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