qcom_scm_import_ice_key(9)
π qcom_scm_import_ice_key β Kernel API Manual β¨
okay bestie, so we're in the Kernel API Manual today and the star of the show is qcom_scm_import_ice_key(9) β yes it's a mouthful, yes it slays, let's get into it π
β¨ NAME β¨
qcom_scm_import_ice_key β the one that imports your key for storage encryption ππ
π¦ SYNOPSIS π¦
int qcom_scm_import_ice_key (const u8 *raw_key , size_t raw_key_size ,
u8 *lt_key , size_t lt_key_size );
that's the whole vibe check right there β one int coming back at you, four args going in π
πΈ ARGUMENTS πΈ
raw_keyβ the raw key you're importing, the actual main character of this operation π«raw_key_sizeβ how bigraw_keyis, in bytes. yes, bytes, we measure things here πlt_keyβ your output buffer, where the long-term wrapped key gets to live π‘β¨lt_key_sizeβ size oflt_keyin bytes, and listen β it must be the exact wrapped key size that the SoC uses. not close, not approximate, exact. the SoC is not flexible about this and honestly respect π
π DESCRIPTION π
So what does it do? It imports a raw key and hands you back a long-term wrapped key. That's it, that's the plot π«Ά
Under the hood it uses the SoC's HWKM to wrap the raw key using the platform-specific Key Encryption Key β hardware doing hardware things, no cap π₯π
β RETURN β
0 on success, -errno on failure. iconic behavior, no notes ππ
π SEE ALSO π
the whole friend group, and they all showed up to the group chat π
Kernel file ./drivers/firmware/qcom/qcom_scm.c, plus:
struct qcom_scm_qseecom_resp(9)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_derive_sw_secret(9)qcom_scm_generate_ice_key(9)qcom_scm_prepare_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)
aaaand that's the page, bestie π§π this one lives in ./drivers/firmware/qcom and it's dated October 2026 β so yeah, future-coded of it β¨π¦ go forth and import those keys responsibly, mwah ππ
π¦ 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