STRUCT CCP_SHA_ENGINE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ 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, so ctx knows 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, final
  • msg_bits if final is 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