STRUCT POLYVAL_ELEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct polyval_elem(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this page is literally all about struct polyval_elem, and it's genuinely not as scary as it sounds, i promise 🫢


✨ NAME ✨

struct polyval_elem β€” an element of the POLYVAL finite field 🌸


πŸŽ€ SYNOPSIS πŸŽ€

struct polyval_elem {
    union {
      u8 bytes[POLYVAL_BLOCK_SIZE];
      struct {
        __le64 lo;
        __le64 hi;
      };
    };
 };

like, that's the whole vibe. a union of a union, living its best life πŸ’€


πŸ¦‹ MEMBERS πŸ¦‹

  • {unnamed_union} β€” anonymous, no name, no notes, it's giving mysterious main character energy πŸ™ˆ
  • bytes β€” the element seen as a byte array (it's unioned with lo and hi, so same memory, different outfit πŸ’…)
  • {unnamed_struct} β€” also anonymous, also iconic, also unnamed 😭
  • lo β€” the low 64 terms of the element's polynomial ✨
  • hi β€” the high 64 terms of the element's polynomial ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so this struct represents, like, one single element of the finite field GF(2^128) πŸ”₯

and it does it the POLYVAL way: little-endian byte order and natural bit order. no cap, that's the convention, that's the whole thing, periodt πŸ’œ


🌈 SEE ALSO 🌈

Kernel file ./include/crypto/gf128hash.h:


ngl bestie, read the whole gf128hash.h family before you go poking at the raw bytes β€” the import/export helpers exist for a reason πŸ’–

okay that's the page!! this one came from ./include/crypto and it's dated October 2026, aka the future, aka she's ahead of her time πŸ§šβ€β™€οΈβœ¨ mwah, go slay your finite field math πŸ’…πŸŽ€

πŸ“¦ where this page comes from