crypto_skcipher_export(9)
β¨ crypto_skcipher_export β¨
okay bestie, this is literally the glow-up of state-saving in the kernel crypto world π
π NAME π
crypto_skcipher_export β export partial state (it's giving "save file for your vibes" energy, no cap)
πΈ SYNOPSIS πΈ
int crypto_skcipher_export(struct skcipher_request *req, void *out);
π¦ ARGUMENTS π¦
reqβ the reference to theskcipher_requesthandle that holds all the info you need to actually do the operation. this is your main character struct, fr.outβ the output buffer, and it needs to be big enough to hold the state. don't skimp on sizing bestie, it's literally not the move. π«Ά
π DESCRIPTION π
so here's the tea: this function exports the partial state of the transformation. it dumps the ENTIRE state of whatever transformation is currently happening into a block of data you provide. then you can import it back later. iconic behavior, honestly.
why would you want this? lowkey genius use case: say you're processing a bunch of data and you want to save your progress mid-transformation. you save that partial result, and then later you can reload it multiple times for multiple re-uses. it's like bookmarking your spot in a fanfic and going back to reread, except it's cryptography and way more serious π
and the best part? no data processing happens at this point. it's purely a state-dump moment. no encryption, no decryption, just vibes and bytes. β¨
π₯ RETURN π₯
0if the cipher operation was successful (slay π )< 0if an error occurred (not slay, but we move π)
π SEE ALSO π
okay this list is LONG so buckle up buttercup, it's a whole shopping list of kernel crypto friends:
- Kernel file
./include/crypto/skcipher.h struct skcipher_request(9)struct skcipher_alg(9)struct lskcipher_alg(9)Symmetric Key Cipher API(9)crypto_alloc_skcipher(9)crypto_alloc_lskcipher(9)crypto_free_skcipher(9)crypto_free_lskcipher(9)crypto_has_skcipher(9)crypto_skcipher_ivsize(9)crypto_lskcipher_ivsize(9)crypto_skcipher_blocksize(9)crypto_lskcipher_blocksize(9)crypto_skcipher_chunksize(9)crypto_lskcipher_chunksize(9)crypto_skcipher_statesize(9)crypto_lskcipher_statesize(9)crypto_skcipher_setkey(9)crypto_lskcipher_setkey(9)crypto_skcipher_reqtfm(9)crypto_skcipher_encrypt(9)crypto_skcipher_decrypt(9)crypto_skcipher_import(9)crypto_lskcipher_encrypt(9)crypto_lskcipher_decrypt(9)Symmetric Key Cipher Request Handle(9)crypto_skcipher_reqsize(9)skcipher_request_set_tfm(9)skcipher_request_alloc(9)skcipher_request_free(9)skcipher_request_set_callback(9)skcipher_request_set_crypt(9)
like I said. LONG. but every single one is linked and valid so don't come for me π
π real talk: this is literally just a state export. no processing, no magic, just "save my progress bestie." don't expect it to do anything else.
and that's the whole page! this gem lives in ./include/crypto and the version vibes are dated October 2026. 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