aead_ccm_esp_setkey(9)
๐
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 ๐:
select_channel(9)spu_skcipher_rx_sg_create(9)spu_skcipher_tx_sg_create(9)handle_skcipher_req(9)handle_skcipher_resp(9)spu_ahash_rx_sg_create(9)spu_ahash_tx_sg_create(9)handle_ahash_req(9)spu_hmac_outer_hash(9)ahash_req_done(9)handle_ahash_resp(9)spu_aead_rx_sg_create(9)spu_aead_tx_sg_create(9)handle_aead_req(9)handle_aead_resp(9)spu_chunk_cleanup(9)finish_req(9)spu_rx_callback(9)skcipher_enqueue(9)spu_no_incr_hash(9)aead_gcm_esp_setkey(9)rfc4543_gcm_esp_setkey(9)spu_functions_register(9)spu_mb_init(9)
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
- 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