crypto_aead_setauthsize(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… crypto_aead_setauthsize(9) โ€” like, the whole manual, but make it make sense

okay so bestie, welcome to the Kernel API Manual ๐ŸŽ€ this one's a tiny little function but she's lowkey important, so grab your iced coffee and let's go โœจ


๐ŸŒธ NAME ๐ŸŒธ

crypto_aead_setauthsize โ€” sets the size of your authentication data, no cap ๐Ÿ’–


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

int crypto_aead_setauthsize (struct crypto_aead *tfm , unsigned int
authsize );

that's it. that's the whole signature. she's short and she knows it ๐Ÿ‘‘


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • tfm โ€” the cipher handle ๐Ÿซถ like, the AEAD thing you're working with. your main character struct.
  • authsize โ€” the size of the authentication data / tag, measured in bytes. yes, bytes. not bits. don't do that to yourself ๐Ÿ˜ญ

โœจ DESCRIPTION โœจ

so the vibe here is: this function sets the authentication data size / the tag size ๐Ÿ”ฅ

here's the thing bestie โ€” AEAD, as a concept, requires an authentication tag (or MAC) on top of the associated data. you don't get to skip it. it's not optional, it's not extra credit, it's literally part of the whole deal ๐Ÿ’… so this call is you telling the kernel "hey, my tag is gonna be this big."

periodt. that's the description. she's efficient ๐ŸŒˆ


โญ RETURN โญ

  • 0 โ€” yay, the setting of the key was successful ๐ŸŽ‰ (yes, that's literally what the manpage says โ€” we're reporting it exactly as written, iykyk ๐Ÿซถ)
  • < 0 โ€” nope, an error occurred ๐Ÿ’€

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

okay so there's a lot of friends in this friend group, and you're gonna wanna know all of them ๐Ÿงš keep these handy:

  • Kernel file ./include/crypto/aead.h Authenticated Encryption With Associated Data (AEAD) Cipher API(9)
  • struct aead_request(9)
  • struct aead_alg(9)
  • crypto_alloc_aead(9)
  • crypto_free_aead(9)
  • crypto_has_aead(9)
  • crypto_aead_ivsize(9)
  • crypto_aead_authsize(9)
  • crypto_aead_blocksize(9)
  • crypto_aead_setkey(9)
  • crypto_aead_encrypt(9)
  • crypto_aead_decrypt(9)
  • Asynchronous AEAD Request Handle(9)
  • crypto_aead_reqsize(9)
  • aead_request_set_tfm(9)
  • aead_request_alloc(9)
  • aead_request_free(9)
  • aead_request_set_callback(9)
  • aead_request_set_crypt(9)
  • aead_request_set_ad(9)

ngl bestie, this page lives in ./include/crypto and it's dated October 2026 โ€” so like, future energy ๐Ÿ”ฎ๐Ÿ’œ anyway, go forth and set those auth sizes correctly, mwah ๐Ÿ’‹โœจ
๐Ÿ“ฆ where this page comes from