STRUCT ALGO_DATA(9)
β¨ struct algo_data(9) β¨
okay so bestie, welcome to the Kernel API Manual π this is the page for struct algo_data β literally the little data bundle that holds all the crypto-algorithm-specific stuff. it's giving "backstage pass to the crypto engine" energy and i'm obsessed π
πΈ NAME πΈ
struct algo_data β Crypto algorithm specific data π¦
π SYNOPSIS π
struct algo_data {
struct sa_eng_info enc_eng;
struct sa_eng_info auth_eng;
u8 auth_ctrl;
u8 hash_size;
u8 iv_idx;
u8 iv_out_size;
u8 ealg_id;
u8 aalg_id;
u8 *mci_enc;
u8 *mci_dec;
bool inv_key;
struct sa_tfm_ctx *ctx;
bool keyed_mac;
void (*prep_iopad)(struct algo_data *algo, const u8 *key, u16
key_sz, __be32 *ipad, __be32 *opad);
};
look at her. a whole struct. main character energy fr fr π
π§ Members π§
okay now the member-by-member vibe check, no cap, every single one:
enc_engβ the Encryption engine info structure. she's the one holding the tea about the encryption side π«auth_engβ the Authentication engine info structure. same energy, but for auth π«Άauth_ctrlβ Authentication control word. short, sweet, in charge.hash_sizeβ Size of digest. like, how big the hash is gonna be πiv_idxβ iv index inpsdata. yes, exactly where it says.iv_out_sizeβ iv out size. that's it. that's the whole vibe.ealg_idβ Encryption Algorithm ID π₯aalg_idβ Authentication algorithm ID π₯mci_encβ Mode Control Instruction for Encryption algorithm. iconic little instruction pointer πmci_decβ Mode Control Instruction for Decryption. her twin, equally iconic.inv_keyβ Whether the encryption algorithm demands key inversion. lowkey important πctxβ Pointer to the algorithm context. she's pointing at the context, literally.keyed_macβ Whether the authentication algorithm has key. yup, that's the whole thing.prep_iopadβ Function pointer to generate intermediate ipad/opad β (yes bestie, a function pointer, she's fancy like that)
π SEE ALSO π
go check these out next, i'm literally begging you π:
- Kernel file
./drivers/crypto/sa2ul.c struct sa_cmdl_cfg(9)struct sa_alg_tmpl(9)struct sa_mapped_sg(9)struct sa_rx_data(9)struct sa_req(9)
ngl bestie, if you made it this far you're officially a kernel crypto girlie now ππ go forth and read those structs.
and that's the page!! mwah π«Ά this one lives under ./drivers/crypto and it's dated October 2026 β slay, periodt, see you in the source tree πβ¨
π¦ 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