polyval(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… polyval(9) β€” the one from the Kernel API Manual

okay so bestie, gather round, because today we're talking about polyval β€” and yes, that's the whole name, no notes. It computes a POLYVAL value. That's it. That's the function. Iconic, lowkey.


✨ SYNOPSIS ✨

The whole vibe in one line, don't blink:

void polyval (const struct polyval_key *key , const u8 *data , size_t
len , u8 out[POLYVAL_BLOCK_SIZE] );

Like… it returns nothing (void, mysterious, main character energy) and it takes four things. Let's meet them 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • key β€” the prepared key. Prepared!! As in already prepped, like she did her skincare routine before the party. Don't hand her a raw key, she's not doing that.
  • data β€” the message data. The actual tea. The content. Give her the bytes.
  • len β€” the length of the data, in bytes. And here's the slay part: it doesn't need to be block-aligned. Fr fr. Any length, she'll handle it, no padding gymnastics required from you πŸ’…
  • out β€” the output value. Where the answer goes. It's a u8 array of POLYVAL_BLOCK_SIZE, so it's a fixed-size situation β€” she writes into it, you don't get to negotiate the size.

πŸ¦‹ CONTEXT πŸ¦‹

Any context. Literally any. No locks, no "only in interrupt context", no "please call from a workqueue or she'll be moody". She's flexible like that. Vibe check: passed ✨


πŸ”₯ SEE ALSO πŸ”₯

The whole friend group, and yes I'm listing every single one because we do not do partial lists in this house:

like, the entire polyval/ghash cinematic universe. go read the whole trilogy, iykyk 🌈


πŸ“ quick reminder bestie: polyval_preparekey(9) before polyval(9). the keyword is prepared. don't skip steps, we don't skip steps πŸ’–

mwah β€” this little page lives in ./include/crypto, dated October 2026, and it's brought to you straight from the Kernel API Manual. periodt. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from