STRUCT GHASH_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ghash_ctx β€” Context for computing a GHASH value ✨

okay so bestie, welcome to struct ghash_ctx(9) from the Kernel API Manual πŸ’… this is the lil' data structure that holds all the state while you're computing a GHASH value, and honestly? it's giving "small but essential." let's get into it 🫢


🌸 SYNOPSIS 🌸

struct ghash_ctx {
    const struct ghash_key *key;
    struct polyval_elem acc;
    size_t partial;
 };

that's the whole vibe. three fields, no cap. πŸŽ€


πŸ¦‹ Members πŸ¦‹

  • key β€” a pointer to the prepared GHASH key, bestie. ⚠️ and here's the part where you gotta pay attention: 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. don't let that key dip out while the context still needs it, fr fr 😭
  • acc β€” the accumulator, aka where the math actually accumulates. plot twist: it's stored in POLYVAL format rather than GHASH format, because most implementations want it in POLYVAL format anyway. it's giving efficiency 🌈 like why convert back and forth when everyone wants the same thing?
  • partial β€” the number of data bytes processed so far, modulo GHASH_BLOCK_SIZE. so like, how far into the current block are we? that kind of energy. πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

like, the whole GHASH/POLYVAL friend group is linked here β€” go read the rest of the lore, iykyk πŸ“šβœ¨


ok that's the whole page, no filler, no fluff, every field accounted for. go keep that key alive, bestie. πŸ«ΆπŸ’–

and finally, a cute lil' sign-off: this masterpiece lives under the source path ./include/crypto, dated October 2026, and yeah β€” it's literally titled struct ghash_ctx(9). slay πŸ’…πŸ‘‘

πŸ“¦ where this page comes from