STRUCT CCP_SHA_ENGINE(9)
π NAME π
struct ccp_sha_engine β the CCP SHA operation, bestie. It's the struct that holds literally everything you need for a SHA run on the CCP β¨
So this one lives in the Kernel API Manual β yes, that's our manual, we're fancy now π
π¦ SYNOPSIS π¦
struct ccp_sha_engine {
enum ccp_sha_type type;
struct scatterlist *ctx;
u32 ctx_len;
struct scatterlist *src;
u64 src_len;
struct scatterlist *opad;
u32 opad_len;
u32 first;
u32 final;
u64 msg_bits;
};
That's the whole glow-up right there π copy it exactly, no cap.
πΈ Members πΈ
Ok so every single field, one by one, and what it's giving:
typeβ the type of SHA operation you're doing β¨ like, which flavor.ctxβ the current hash value. This is the main character, lowkey.ctx_lenβ length in bytes of the hash value, soctxknows how big it is πsrcβ the data to be used for this operation. The actual snack.src_lenβ length in bytes of the data used for this operation πopadβ data to be used for the final HMAC operation π yes, final, keep that in mind.opad_lenβ length in bytes of the data used for that final HMAC operation.firstβ indicates the first SHA operation. The beginning, the origin story πfinalβ indicates the final SHA operation. The grand finale π¬msg_bitsβ total length of the message in bits, used in the final SHA operation π§
β¨ Description β¨
Here's the vibe check: these are the variables you have to set when calling ccp_enqueue_cmd π no skipping, that's the whole assignment:
type,ctx,ctx_len,src,src_len,finalmsg_bitsiffinalis non-zero
And now the important part, bestie, listen β the ctx variable is used as both input and output π like it's doing double duty. On completion of the SHA operation, the new hash value overwrites the old hash value. So your old hash? Gone. Replaced. Slay, but be aware π₯
π SEE ALSO π
Kernel file ./include/linux/ccp.h β and a whole friend group of references:
ccp_present(9)ccp_version(9)ccp_enqueue_cmd(9)struct ccp_aes_engine(9)struct ccp_xts_aes_engine(9)struct ccp_des3_engine(9)struct ccp_rsa_engine(9)struct ccp_passthru_engine(9)struct ccp_passthru_nomap_engine(9)struct ccp_ecc_modular_math(9)struct ccp_ecc_point(9)struct ccp_ecc_point_math(9)struct ccp_ecc_engine(9)struct ccp_cmd(9)
Ok that's the whole page!! This one's sourced from ./include/linux and it's dated October 2026 β so yeah, future icon behavior fr fr π go forth and hash responsibly, ily π«Άπ
π¦ 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