STRUCT CCP_ECC_MODULAR_MATH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ccp_ecc_modular_math(9) β€” like, the CCP ECC modular math parameters, bestie

okay so this is a page straight outta the Kernel API Manual, and it's about struct ccp_ecc_modular_math β€” the lil' bundle of pointers and lengths you hand to the CCP (that's the Crypto Coprocessor, iykyk) when you want it to do modular math for you. no cap, it's a whole vibe: a couple of operands, a result buffer, and the lengths so nobody overruns anything. slay. ✨


🌸 NAME 🌸

struct ccp_ecc_modular_math β€” the CCP ECC modular math parameters. that's it, that's the whole personality. πŸŽ€


✨ SYNOPSIS ✨

struct ccp_ecc_modular_math {
    struct scatterlist *operand_1;
    unsigned int operand_1_len;
    struct scatterlist *operand_2;
    unsigned int operand_2_len;
    struct scatterlist *result;
    unsigned int result_len;
 };

look at her. six fields. immaculate. 🫢


πŸ¦‹ Members πŸ¦‹

  • operand_1 β€” the first operand for the modular math operation. the main character of the op, honestly. πŸ’–
  • operand_1_len β€” the length of the first operand. yes bestie, you gotta tell it how big she is.
  • operand_2 β€” the second operand for the modular math operation. ⚠️ but heads up: it's not used for CCP_ECC_FUNCTION_MINV_384BIT. like, that function literally doesn't need her. πŸ’€
  • operand_2_len β€” the length of the second operand. and same deal: not used for CCP_ECC_FUNCTION_MINV_384BIT. πŸ™ˆ
  • result β€” the result of the modular math operation. the payoff. the reveal. the moment. πŸ”₯
  • result_len β€” the length of the supplied result buffer. so the hardware knows exactly how much room it's got in there. no overflowing, periodt. πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

kernel file ./include/linux/ccp.h β€” go read it, it's giving lore. πŸ“–

and then the whole friend group:

ccp_present(9), ccp_version(9), ccp_enqueue_cmd(9), struct ccp_aes_engine(9), struct ccp_xts_aes_engine(9), struct ccp_sha_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_point(9), struct ccp_ecc_point_math(9), struct ccp_ecc_engine(9), struct ccp_cmd(9)

✨ every single one of them cross-referenced, no gatekeeping. 🌈


🧚 real talk: operand_2 and operand_2_len just sit there unused when you're running CCP_ECC_FUNCTION_MINV_384BIT. not broken, just not invited. don't @ me. πŸ’…

and that's the page, bestie πŸ“ β€” brought to you by the folks over at ./include/linux, dated October 2026, filed forever under struct ccp_ecc_modular_math(9). go forth and modular-math. β­πŸ‘‘

πŸ“¦ where this page comes from