aead_ccm_esp_setkey(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… aead_ccm_esp_setkey(9) โ€” the setkey() glow-up for the ESP variant of CCM AES

okay so real talk, this is a page from the Kernel API Manual, and it's all about one lil function that handles key setup. bestie, it's short but it matters. let's get into it ๐ŸŽ€


โœจ SYNOPSIS โœจ

int aead_ccm_esp_setkey (struct crypto_aead *cipher , const u8 *key ,
       unsigned int keylen );

like, literally three args and an int return. clean. iconic. no notes. ๐Ÿ‘‘


๐Ÿซถ ARGUMENTS ๐Ÿซถ

  • cipher โ€” your AEAD structure, the main character of this whole operation ๐Ÿ’–
  • key โ€” the key, and then right after it comes 4 bytes of salt. yes, they're sharing a car. it's giving carpool energy ๐Ÿš—
  • keylen โ€” how long the key plus the salt is, counted in bytes. so like, key bytes + 4. math queen behavior ๐Ÿงฎโœจ

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so what's actually happening here? the function extracts the salt from the key and stores it so it can be prepended to the IV on each request. she's putting the little garnish on every single request, fr fr ๐Ÿง‚

and the digest? always 16 bytes. not 15, not 17. sixteen. periodt. ๐Ÿ’€


๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

it returns the value from the generic ccm setkey. that's it, that's the whole vibe โ€” we're just passing the result along like a group chat forward ๐Ÿ™ˆ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

okay this list is long and honestly kind of legendary โ€” it's the whole cast of characters from the kernel file ./drivers/crypto/bcm/cipher.c, so buckle up bestie ๐ŸŒˆ:

like, this function has friends. a whole squad. she's not doing this alone ๐Ÿ’œ


and that's the whole page, bestie! short, sweet, and lowkey crucial. this one lives in ./drivers/crypto/bcm and the docs are dated October 2026 โ€” so go forth and set those keys, you absolute legend ๐Ÿฆ‹โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from