cnstr_shdsc_ahash(9)
πΈ cnstr_shdsc_ahash β ahash shared descriptor πΈ
okay so this is a page from the Kernel API Manual (section 9, kernel girlies rise), and it's all about cnstr_shdsc_ahash β the function that builds you an ahash shared descriptor. yes bestie, we're doing crypto descriptor construction today and we're gonna slay it π
β¨ SYNOPSIS β¨
void cnstr_shdsc_ahash(u32 * const desc, struct alginfo *adata, u32 state,
int digestsize, int ctx_len, bool import_ctx, int era);
it returns void β nothing comes back, no cap, the descriptor buffer just gets filled in. π«Ά
π¦ ARGUMENTS π¦
descβ pointer to the buffer used for descriptor construction. this is the canvas, your main character, the place where the descriptor gets written πadataβ pointer to the authentication transform definitions. lowkey important detail here: a split key is required for SEC Era < 6, and in that case the size of the split key is specified in this one. valid algorithm values are β one ofOP_ALG_ALGSEL_{MD5, SHA1, SHA224, SHA256, SHA384, SHA512}. pick your fighter βstateβ the algorithm state, one ofOP_ALG_AS_{INIT, FINALIZE, INITFINALIZE, UPDATE}. it's giving phases of a glow-up, honestly πdigestsizeβ the algorithm's digest size. how big the digest is. that's the whole vibe π₯ctx_lenβ size of the Context Register. yes, that's the Context Register specifically, not some other register πimport_ctxβtrueif the previous Context Register needs to be restored. and here's the tea: it must betruefor ahash update and final, and it must befalsefor ahash first and digest. so like, no mixing that up, okay? πeraβ the SEC Era. which era we're in. iconic either way π
ngl bestie, thatimport_ctxone is the trap on this page βtruefor update and final,falsefor first and digest. memorize it, iykyk π
π SEE ALSO π
- Kernel file
./drivers/crypto/caam/caamhash_desc.c cnstr_shdsc_sk_hash(9)
and that's the whole page, no notes π¦ mwah π
sign-off szn β this one lives in ./drivers/crypto/caam, dated October 2026, and it's your girl cnstr_shdsc_ahash(9) signing off. 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