STRUCT POLYVAL_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct polyval_ctx(9) β€” the Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Linux Kernel API Manual, and today's main character is struct polyval_ctx β€” no cap, the literal context for computing a POLYVAL value. she's giving "I hold your state so you don't have to" energy ✨


🌸 NAME 🌸

struct polyval_ctx β€” Context for computing a POLYVAL value πŸ’–

Like, she's the lil' workspace where the POLYVAL math happens. Obsessed.


✨ SYNOPSIS ✨

struct polyval_ctx {
    const struct polyval_key *key;
    struct polyval_elem acc;
    size_t partial;
 };

that's the whole struct, bestie β€” three members, zero drama πŸ¦‹


🫢 Members 🫢

so here's the breakdown of every field, and yes I'm doing all of them:

  • key β€” a pointer to the prepared POLYVAL key. πŸ—οΈ important! the user of the API is responsible for ensuring that the key lives as long as the context. that's on you, not on the kernel β€” if the key dips out early, that's a you problem, fr fr. 😭
  • acc β€” the accumulator. πŸ’œ she accumulates. that's her job. that's her whole vibe.
  • partial β€” the number of data bytes processed so far, modulo POLYVAL_BLOCK_SIZE. so like, the leftover-bytes counter. the "how far into the current block are we" situation. 🌈

πŸ‘€ SEE ALSO πŸ‘€

okay this list is long but every single one of these is iconic in her own right, no skips:

the ghash girlies and the polyval girlies, side by side. πŸ’… we love a crossover episode.


πŸŽ€ lowkey reminder: key has to outlive the context. I said what I said. don't come crying to me when your pointer is dangling. πŸ’€

and that's the page! this one came out of ./include/crypto, dated October 2026, and it's literally titled struct polyval_ctx(9) β€” so yeah, go forth and hash responsibly, bestie πŸ§šπŸ’–βœ¨

πŸ“¦ where this page comes from