spu2_request_pad(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spu2_request_pad β€” the Kernel API Manual page, but make it make sense

okay bestie, so this one lives in the Kernel API Manual and it's literally the function that handles the ✨leftovers✨ β€” the pad bytes at the end of your data. Yes, padding. It's not glamorous but it IS load-bearing, so let's get into it πŸŽ€


✨ NAME ✨

spu2_request_pad β€” create pad bytes at the end of the data. that's it, that's the whole vibe 🫢


🌸 SYNOPSIS 🌸

void spu2_request_pad (u8 *pad_start , u32 gcm_padding , u32
hash_pad_len , enum hash_alg auth_alg , enum hash_mode auth_mode ,
unsigned int total_sent , u32 status_padding );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • pad_start β€” start of the buffer where the pad bytes are gonna be written. this is the spot, the location, the moment πŸ’«
  • gcm_padding β€” the length of the GCM padding, in bytes. numbers, we love her
  • hash_pad_len β€” how many bytes of padding it takes to extend the data to a full block. the glow-up-to-full-block count ✨
  • auth_alg β€” the authentication algorithm. which one? that's the enum hash_alg of it all
  • auth_mode β€” the authentication mode. again, enum hash_mode, we don't make the rules
  • total_sent β€” the length that gets inserted at the end of the hash pad πŸ‘‘
  • status_padding β€” how many bytes of padding it takes to align the STATUS word πŸ”₯

πŸ’– DESCRIPTION πŸ’–

so there may be three forms of pad, and honestly? each one is serving a different purpose. it's giving "three sisters, three destinies" 😭

  1. GCM pad β€” for GCM mode ciphers, pad to 16-byte alignment. sixteenth-byte alignment is the standard, no cap πŸ’…
  2. hash pad β€” pad to a block length, with 0x80 data terminator and size at the end. note the 0x80 terminator, bestie, it's not optional, it's the whole personality 🌈
  3. STAT pad β€” to ensure the STAT field is 4-byte aligned ⭐
fr fr, these three are the only forms of pad described here β€” don't go inventing a fourth, i'm begging πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/crypto/bcm/spu2.c, plus the whole friend group:


okay that's the page!! πŸŽ€ sourced from ./drivers/crypto/bcm, dated October 2026 β€” go forth and pad responsibly, ily, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from