ocs_aes_gcm_op(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ocs_aes_gcm_op(9) β€” the Kernel API Manual, but make it make sense

okay so bestie, this is ocs_aes_gcm_op(9) from the kernel API manual and honestly? she's giving crypto girlboss. this is a function that performs a GCM operation ✨ (yes, that GCM β€” Galois/Counter Mode, the one with the tag). let's get into it πŸŽ€


🌸 SYNOPSIS 🌸

int ocs_aes_gcm_op (struct ocs_aes_dev *aes_dev , enum ocs_cipher cipher
, enum ocs_instruction instruction , dma_addr_t dst_dma_list ,
dma_addr_t src_dma_list , u32 src_size , const u8 *iv , dma_addr_t
aad_dma_list , u32 aad_size , u8 *out_tag , u32 tag_size );

she takes eleven arguments. eleven! main character energy fr fr πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • aes_dev β€” the OCS AES device you're using. your hardware boo πŸ’–
  • cipher β€” the cipher to use. your options are AES or SM4, pick your fighter πŸ₯Š
  • instruction β€” what you actually want to do: encrypt or decrypt. no in-between, she doesn't do vibes 🌈
  • dst_dma_list β€” the OCS DMA list that maps your output memory. where the magic lands ✨
  • src_dma_list β€” the OCS DMA list mapping the input payload data. the lore going in πŸ“₯
  • src_size β€” how much data src_dma_list actually maps. numbers, bestie, we love them πŸ”’
  • iv β€” the input IV vector. yes, it's const u8 *, don't touch πŸ‘€
  • aad_dma_list β€” the OCS DMA list mapping the input AAD data. additional authenticated data, doing her thing 🫢
  • aad_size β€” the amount of data mapped by aad_dma_list πŸ“
  • out_tag β€” where to store the computed tag. the receipt, basically 🧾
  • tag_size β€” the size, in bytes, of out_tag. keep it consistent or it's gonna be a whole situation 😭

⭐ RETURN ⭐

0 on success πŸ’š, and a negative error code otherwise πŸ’€. no cap, that's the whole contract.


πŸ‘‘ SEE ALSO πŸ‘‘


lowkey a reminder: iv is const u8 * and the DMA lists are dma_addr_t β€” so like, don't go passing random addresses and then acting surprised when it breaks πŸ™ˆ

and that's the page!! brought to you by ./drivers/crypto/intel/keembay, dated October 2026, under the header ocs_aes_gcm_op(9) β€” slay, go encrypt something responsibly πŸ”₯πŸ’œ

πŸ“¦ where this page comes from