omac1_aes_128(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… omac1_aes_128 (kernel API manual, bestie edition) πŸ’…

okay so real talk, this is omac1_aes_128(9) from the Kernel API Manual and it's literally the glow-up page for a MAC function. stay with me, it's not scary, i promise 🫢


✨ NAME ✨

omac1_aes_128 β€” One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC). yes she has three names, she's THAT girl πŸ‘‘


🌸 SYNOPSIS 🌸

int omac1_aes_128 (u8 *key , u8 *data , size_t data_len , u8 *mac );

like, that's the whole vibe. four args, one int back. clean. iconic. no notes πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • key β€” your 128-bit key for the hash operation. it's giving secret. guard it with your life fr fr πŸ”
  • data β€” the data buffer for which a MAC is determined. this is the stuff you're authenticating, bestie πŸ“¦
  • data_len β€” length of the data buffer, in bytes. yes, bytes. count them. don't lie about them 😭
  • mac β€” buffer for the MAC, and it's 128 bits, i.e. 16 bytes. 16. bytes. don't skimp or you're gonna have a bad time πŸ’€

⭐ RETURN ⭐

  • 0 on success πŸŽ‰ slay
  • -1 on failure πŸ˜” not slay

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, this is a mode for using a block cipher (AES in this case) for authentication. like, turning your encryption bestie into a bouncer at the club 🫢

and for the lore: OMAC1 was standardized with the name CMAC by NIST in a Special Publication (SP) 800-38B. so if you ever see "CMAC" out in the wild, that's her. same girl, government name. iykyk πŸ‘‘


🌈 SEE ALSO 🌈

  • Kernel file ./drivers/staging/rtl8723bs/core/rtw_security.c β€” go read the source, it's right there, be nosy πŸ”
  • omac1_aes_128_vector(9) β€” her sister page, the vector version. go say hi πŸ’–

ngl this whole page lives in ./drivers/staging/rtl8723bs/core, so if you're lost, that's your home base bestie 🏠

that's the whole page! source/version is ./drivers/staging/rtl8723bs/core, dated October 2026, and this manual page is omac1_aes_128(9) β€” mwah, go authenticate something safely, ily πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from