crypto_aead_authsize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_aead_authsize β€” the Kernel API Manual, bestie edition

okay so real talk, this one's from the Kernel API Manual, and it's literally the glow-up guide for finding out how big your AEAD auth data can get. no cap, it's a lil one-pager and we're gonna eat it up ✨


🌸 NAME 🌸

crypto_aead_authsize β€” obtain maximum authentication data size πŸŽ€


✨ SYNOPSIS ✨

unsigned int crypto_aead_authsize (struct crypto_aead *tfm );

like, that's the whole vibe. one function, one handle, one answer πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • tfm β€” the cipher handle. yeah, that's it. that's the argument. she's lowkey the main character here πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so basically, this function hands you back the maximum size of the authentication data for whatever AEAD cipher your AEAD cipher handle is pointing at. it's giving "how much tag can this thing possibly produce" energy πŸ’€

and here's the tea: that authentication data size may be zero if the cipher implements a hard-coded maximum. not a bug, just how she rolls πŸ™ˆ

also, iykyk β€” the authentication data may also be known as the "tag value" 🏷️✨ so if you see "tag" floating around somewhere else, it's the same thing. don't let the naming jump-scare you.


⭐ RETURN ⭐

the authentication data size / tag size in bytes πŸ“ like, that's the whole return value. a nice lil unsigned int of bytes, slay.


πŸ’œ SEE ALSO πŸ’œ

okay bestie, this is the friend group. every single one of them, no skipping πŸ‘€

  • 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_blocksize(9)
  • crypto_aead_setkey(9)
  • crypto_aead_setauthsize(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)
fr fr go read crypto_aead_setauthsize(9) next if you're setting this stuff, they're like siblings 🫢

okay that's the page!! mwah πŸ’‹ this one came from ./include/crypto and it's dated October 2026 β€” so like, remember it fondly, and go get that tag size bestie πŸŒˆπŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from