ocs_hcu_hmac(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ocs_hcu_hmac β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual entry for ocs_hcu_hmac(9) β€” literally the function whose whole entire job is computing an HMAC. that's it. that's the vibe. no cap. πŸŽ€


🌸 NAME 🌸

ocs_hcu_hmac β€” compute HMAC. yes ghoul, it does exactly what the name says, main character energy from the very first line πŸ’…


✨ SYNOPSIS ✨

int ocs_hcu_hmac (struct ocs_hcu_dev *hcu_dev , enum ocs_hcu_algo algo ,
const u8 *key , size_t key_len , const struct ocs_hcu_dma_list *dma_list
, u8 *dgst , size_t dgst_len );

look at that signature. it's giving seven-whole-parameters. she's thorough, she's precise, she does not skip a single argument πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

okay so let's go through every single one of these, because nobody's getting left out on my watch 🫢

  • hcu_dev β€” the OCS HCU device to use. this is your hardware bestie, the one actually doing the work πŸ’ͺ
  • algo β€” the hash algorithm to use with HMAC. it's an enum ocs_hcu_algo, so pick your fave, but like... actually pick the right one πŸ™ˆ
  • key β€” the key to use. the secret ingredient. the whole personality of the HMAC tbh πŸ”‘
  • key_len β€” the length of key. it's a size_t, and yes you do have to get it right ⭐
  • dma_list β€” the OCS DMA list mapping the input data to process. it's a const struct ocs_hcu_dma_list *, so the data's already mapped and ready to slay 🌈
  • dgst β€” the buffer where to save the computed HMAC. this is where the finished product lands, so make sure it's got room πŸ’–
  • dgst_len β€” the length of dgst. again with the size_t. again: get it right, bestie 😭

πŸ‘‘ RETURN πŸ‘‘

  • 0 on success
  • negative error code otherwise

that's literally it. zero is the slay outcome, anything negative means something went sideways and you should probably look into it πŸ’€


🧚 SEE ALSO 🧚

the kernel file for all of this lives at ./drivers/crypto/intel/keembay/ocs-hcu.c β€” highly recommend a lil scroll if ur nosy like me πŸ‘€

and the whole friend group, in order:

iykyk, that's the whole squad πŸŽ€


real talk though: this page is from the ./drivers/crypto/intel/keembay directory, dated October 2026, and the page itself is ocs_hcu_hmac(9). so like, cite me properly if you're quoting me in ur writeup bestie πŸ’œ

mwah, go forth and compute those HMACs responsibly πŸ“βœ¨

πŸ“¦ where this page comes from