qcom_scm_derive_sw_secret(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– qcom_scm_derive_sw_secret(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual ✨ this one's about qcom_scm_derive_sw_secret and honestly? it's kind of a baddie. it derives a software secret from a wrapped key, and we're gonna walk through it together, no cap 🫢


🌸 NAME 🌸

qcom_scm_derive_sw_secret β€” derive software secret from wrapped key πŸ’…

like, the whole personality of this function is in that one line and she ate.


πŸ¦‹ SYNOPSIS πŸ¦‹

int qcom_scm_derive_sw_secret (const u8 *eph_key , size_t eph_key_size ,
u8 *sw_secret , size_t sw_secret_size );

that's the whole signature, copied exactly, because we do not play with code around here πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • eph_key β€” an ephemerally-wrapped key πŸ’œ ngl the name says it all, it's the wrapped key you're feeding in
  • eph_key_size β€” the size of eph_key, measured in bytes πŸ“
  • sw_secret β€” the output buffer where the software secret lands ✨ this is where the magic gets written, bestie
  • sw_secret_size β€” how many bytes of software secret you want derived 🌸

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the vibe check πŸ‘€ this function derives a software secret from an ephemerally-wrapped key, and it does that for software crypto operations. lowkey iconic.

the way it actually works: it calls into the secure execution environment, and that then calls into the hardware to unwrap the key and derive the secret. so it's like a relay race but make it firmware 🧚 hardware does the heavy lifting, everybody else just passes the baton πŸŽ€

for more info on sw_secret, go peek at the "Hardware-wrapped keys" section of Documentation/block/inline-encryption.rst β€” iykyk πŸ“–

⭐ RETURN ⭐

  • 0 on success πŸŽ‰ (slay)
  • -errno on failure 😭 (we don't talk about it)

🌈 SEE ALSO 🌈

okay this list is long, and honestly? it's giving main character energy for the whole qcom_scm family πŸ‘‘

kernel file ./drivers/firmware/qcom/qcom_scm.c struct qcom_scm_qseecom_resp(9), plus:

every single one, fr fr πŸ’€ go read them all, i'll wait πŸ’–


and that's the page, bestie! πŸ¦‹ this lil legend lives at ./drivers/firmware/qcom, the version/date stamp on it is October 2026, and the page title is qcom_scm_derive_sw_secret(9) β€” mwah πŸ’‹ periodt.

πŸ“¦ where this page comes from