cnstr_shdsc_aead_givencap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cnstr_shdsc_aead_givencap πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for cnstr_shdsc_aead_givencap β€” literally the function that builds you an IPSec ESP encapsulation shared descriptor (non-protocol flavoured ✨) with a HW-generated initialization vector. no cap, that's the whole NAME section, she's lowkey iconic.


✨ SYNOPSIS ✨

void cnstr_shdsc_aead_givencap (u32 * const desc , struct alginfo *cdata
, struct alginfo *adata , unsigned int ivsize , unsigned int icvsize ,
const bool is_rfc3686 , u32 *nonce , const u32 ctx1_iv_off , const bool
is_qi , int era );

void, bestie. she returns nothing. she just builds. main character energy fr fr 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • desc β€” pointer to the buffer used for descriptor construction. this is where the magic gets written, she's the canvas πŸ’–
  • cdata β€” pointer to block cipher transform definitions. valid algorithm values are one of OP_ALG_ALGSEL_{AES, DES, 3DES} ANDed with OP_ALG_AAI_CBC or OP_ALG_AAI_CTR_MOD128. that's the whole list, don't come for me 🌸
  • adata β€” pointer to authentication transform definitions. heads up queen: a split key is required for SEC Era < 6, and in that case the size of the split key is specified here. valid algorithm values are one of OP_ALG_ALGSEL_{MD5, SHA1, SHA224, SHA256, SHA384, SHA512} ANDed with OP_ALG_AAI_HMAC_PRECOMP. slay πŸ’…
  • ivsize β€” initialization vector size. literally the size of the IV πŸ¦‹
  • icvsize β€” integrity check value (ICV) size, and yes it can be truncated or full, your call ✨
  • is_rfc3686 β€” true when ctr(aes) is wrapped by the rfc3686 template. a little bool doing a big job πŸ‘‘
  • nonce β€” pointer to the rfc3686 nonce πŸŽ€
  • ctx1_iv_off β€” IV offset in the CONTEXT1 register. it's const u32, so don't even think about it πŸ”₯
  • is_qi β€” true when called from caam/qi ⭐
  • era β€” SEC Era. just... the era. know your era bestie πŸ’œ

🌈 SEE ALSO 🌈

the kernel file she lives in:

./drivers/crypto/caam/caamalg_desc.c

and her whole friend group, all iconics, all (9):

go read them. iykyk πŸ“š


okay that's the whole page, mwah πŸ’‹ β€” signed off from ./drivers/crypto/caam, dated October 2026, and the queen herself is cnstr_shdsc_aead_givencap(9). periodt πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from