spum_request_pad(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ spum_request_pad(9) ✨

okay so this is a page from the Kernel API Manual β€” yes bestie, we're in kernel land today, and honestly? it's giving cryptography main character energy πŸ’…

πŸŽ€ NAME πŸŽ€

spum_request_pad β€” literally just creates pad bytes at the end of the data. that's the whole vibe. padding. iconic. 🫢

✨ SYNOPSIS ✨

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

returns void, so like… it does the thing and doesn't even brag about it. humble king πŸ‘‘

🌸 ARGUMENTS 🌸

  • pad_start β€” the start of the buffer where the pad bytes are gonna be written. this is where the magic happens, no cap ✨
  • gcm_ccm_padding β€” length of the GCM/CCM padding, in bytes. we measuring, we precise πŸ“
  • hash_pad_len β€” number of bytes of padding that extend the data to a full block. gotta fill that block up, it's giving completionist 🧚
  • auth_alg β€” the authentication algorithm. which one? that's between you and enum hash_alg
  • auth_mode β€” the authentication mode. also an enum situation. iykyk
  • total_sent β€” the length that gets inserted at the end of the hash pad. length? inserted? at the end? yes. slay
  • status_padding β€” number of bytes of padding needed to align the STATUS word. alignment is self care, fr fr πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

so there may be three forms of pad, and we're gonna go through all of them because we don't skip sections in this house 🏠✨

  1. GCM/CCM pad β€” for GCM/CCM mode ciphers, pad to 16-byte alignment. sixteen. not fifteen, not seventeen. sixteen πŸ”₯
  2. hash pad β€” pad to a block length, with a 0x80 data terminator and the size at the end. terminator at the front-ish, size at the end β€” the way that works out is honestly beautiful 😭
  3. STAT pad β€” to ensure the STAT field is 4-byte aligned. four bytes of pure structure. gorgeous. no notes πŸ’…
bestie note: yes, the description says "STAT pad" and the argument is called status_padding. that's just how it is. we don't question the ancestors πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

all the siblings!! the whole friend group!! go read these too, they're all in the kernel file ./drivers/crypto/bcm/spu.c:


and that's the page!! πŸŽ€ from ./drivers/crypto/bcm, dated October 2026 β€” so like, future vibes, but the padding knowledge is timeless πŸ’–βœ¨ go forth and align your STATUS words bestie, you've got this πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from