STRUCT ALGO_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 in psdata. 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