STRUCT ALGINFO(9)
π struct alginfo(9) π
okay so welcome to the Kernel API Manual bestie, and today's main character is struct alginfo β literally just a container for algorithm details. that's it. that's the vibe. it holds all the little facts about your algorithm so the rest of the kernel doesn't have to go hunting for them π
β¨ NAME β¨
struct alginfo β the container for algorithm details, no cap π
πΈ SYNOPSIS πΈ
struct alginfo {
u32 algtype;
unsigned int keylen;
unsigned int keylen_pad;
dma_addr_t key_dma;
dma_addr_t protected_key_dma;
const void *key_virt;
bool key_inline;
u32 plain_keylen;
u32 key_cmd_opt;
};
like, look at her. nine fields. perfectly curated. iconic β¨
π¦ Members π¦
so each of these fields is doing its own little job and honestly? they all ate π
algtypeβ the algorithm selector. for what the valid values actually are, go read the documentation of whichever function is using it (iykyk, it's context-dependent bestie) π₯keylenβ length of the provided algorithm key, in bytes.keylen_padβ the padded length of the provided algorithm key, in bytes. yes, padded. like a cozy little key πkey_dmaβ the dma (bus) address where the algorithm key resides.protected_key_dmaβ the dma (bus) address where the protected key resides. fancy.key_virtβ the virtual address where the algorithm key resides.key_inlineβtruemeans the key can be inlined right there in the descriptor;falsemeans the key is referenced by the descriptor instead. two paths, both valid, choose your fighter πplain_keylenβ size of the key to be loaded by the CAAM.key_cmd_optβ optional parameters for theKEYcommand. optional! but lowkey important.
π SEE ALSO π
go check out the kernel file ./drivers/crypto/caam/desc_constr.h, plus desc_inline_query(9) and append_proto_dkp(9) β they're all in the same friend group fr fr π«Ά
and that's the whole page bestie π§ sign-off time: this lil beauty lives in ./drivers/crypto/caam, dated October 2026, and it's struct alginfo(9) forever and always. 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