ocs_aes_gcm_op(9)
π 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 datasrc_dma_listactually maps. numbers, bestie, we love them π’ivβ the input IV vector. yes, it'sconst 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 byaad_dma_listπout_tagβ where to store the computed tag. the receipt, basically π§Ύtag_sizeβ the size, in bytes, ofout_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 π
- the kernel file
./drivers/crypto/intel/keembay/ocs-aes.cβ go read the source, iykyk π ocs_dma_linked_list(9)ocs_aes_set_key(9)ocs_aes_op(9)ocs_aes_ccm_op(9)ocs_create_linked_list_from_sg(9)
lowkey a reminder:ivisconst u8 *and the DMA lists aredma_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
- 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