polyval(9)
π 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 au8array ofPOLYVAL_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:
- Kernel file
./include/crypto/gf128hash.h struct polyval_elem(9)struct ghash_key(9)struct polyval_key(9)struct ghash_ctx(9)struct polyval_ctx(9)ghash_preparekey(9)polyval_preparekey(9)ghash_init(9)polyval_init(9)polyval_import_blkaligned(9)polyval_export_blkaligned(9)ghash_update(9)polyval_update(9)ghash_final(9)polyval_final(9)ghash(9)
like, the entire polyval/ghash cinematic universe. go read the whole trilogy, iykyk π
π quick reminder bestie:polyval_preparekey(9)beforepolyval(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
- 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