qcom_scm_derive_sw_secret(9)
π 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 ineph_key_sizeβ the size ofeph_key, measured in bytes πsw_secretβ the output buffer where the software secret lands β¨ this is where the magic gets written, bestiesw_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 onsw_secret, go peek at the "Hardware-wrapped keys" section ofDocumentation/block/inline-encryption.rstβ iykyk π
β RETURN β
0on success π (slay)-errnoon 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:
qcom_scm_call(9)qcom_scm_call_atomic(9)qcom_scm_set_warm_boot_addr(9)qcom_scm_set_cold_boot_addr(9)qcom_scm_cpu_power_down(9)qcom_scm_is_pas_available(9)qcom_scm_restore_sec_cfg_available(9)qcom_scm_assign_mem(9)qcom_scm_ocmem_lock_available(9)qcom_scm_ocmem_lock(9)qcom_scm_ocmem_unlock(9)qcom_scm_ice_available(9)qcom_scm_ice_invalidate_key(9)qcom_scm_ice_set_key(9)qcom_scm_generate_ice_key(9)qcom_scm_prepare_ice_key(9)qcom_scm_import_ice_key(9)qcom_scm_hdcp_available(9)qcom_scm_hdcp_req(9)qcom_scm_qseecom_call(9)qcom_scm_qseecom_get_version(9)qcom_scm_qseecom_app_get_id(9)qcom_scm_qseecom_app_send(9)qcom_scm_qtee_invoke_smc(9)qcom_scm_qtee_callback_response(9)qcom_scm_is_available(9)
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
- 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