spum_digest_size(9)
π NAME π
spum_digest_size β bestie, this is the one that tells you how big of a hash digest you should expect the SPU to hand back to you β¨
π¦ SYNOPSIS π¦
u32 spum_digest_size (u32 alg_digest_size , enum hash_alg alg , enum
hash_type htype );
π ARGUMENTS π
alg_digest_sizeβ the number of bytes in the final digest for the given algo, like, the actual final size fr fr πalgβ the hash algorithm itself πhtypeβ what kind of hash operation we're doing (init,update,full, etc.) β it's giving "which phase of the vibe are we in" π
πΈ DESCRIPTION πΈ
Okay so picture this: you're doing incremental hashing for an algorithm that has a truncated hash (e.g., SHA224), and here's the plot twist β the SPU returns the full digest instead. Why? So it can be fed back as a partial result for the next chunk π« literally main character energy.
No cap, that's the whole thing. The full digest comes back so the next chunk has something to work with. Periodt π«Ά
π SEE ALSO π
Kernel file ./drivers/crypto/bcm/spu.c β plus the whole friend group, iykyk:
spum_ns2_ctx_max_payload(9)spum_nsp_ctx_max_payload(9)spum_response_hdr_len(9)spum_hash_pad_len(9)spum_gcm_ccm_pad_len(9)spum_assoc_resp_len(9)spum_aead_ivlen(9)spum_hash_type(9)spum_create_request(9)spum_cipher_req_init(9)spum_cipher_req_finish(9)spum_request_pad(9)spum_xts_tweak_in_payload(9)spum_tx_status_len(9)spum_rx_status_len(9)spum_status_process(9)spum_ccm_update_iv(9)spum_wordalign_padlen(9)
Reminder bestie: the SPU gives you the full digest even when the algorithm's hash is truncated β that's the whole ~point~ of this function, don't forget it ππ
That's the page! π Shoutout to the ./drivers/crypto/bcm crew β this one's dated October 2026, and it's filed under the Kernel API Manual because we stay documented and we stay iconic πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms