cnstr_shdsc_ahash(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 of OP_ALG_ALGSEL_{MD5, SHA1, SHA224, SHA256, SHA384, SHA512}. pick your fighter ⭐
  • state β€” the algorithm state, one of OP_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 β€” true if the previous Context Register needs to be restored. and here's the tea: it must be true for ahash update and final, and it must be false for 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, that import_ctx one is the trap on this page β€” true for update and final, false for first and digest. memorize it, iykyk 😭

πŸ’œ SEE ALSO πŸ’œ


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