qcom_ice_prepare_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🧊 qcom_ice_prepare_key(9) β€” like, the Kernel API Manual one, bestie

okay so bestie, gather round, because we're about to talk about qcom_ice_prepare_key and honestly? it's giving crypto glow-up energy. ✨ this is the page from the Kernel API Manual and yes we're doing the whole thing, no skips, no cap. πŸ’…


πŸŽ€ NAME πŸŽ€

qcom_ice_prepare_key β€” prepare a wrapped key for inline encryption. that's it, that's the whole vibe. it takes a key that's already wrapped and wraps it again. iconic behaviour honestly πŸ¦‹


✨ SYNOPSIS ✨

int qcom_ice_prepare_key (struct qcom_ice *ice , const u8 *lt_key ,
       size_t lt_key_size , u8 eph_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE] );

literally copy it exactly, don't @ me, this is the signature and she is not up for editing πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • ice β€” the ICE driver data. ur main character struct, the whole context of the operation 🫢
  • lt_key β€” a long-term wrapped key. the original key, pre-glowing-up.
  • lt_key_size β€” size of lt_key, in bytes. we measure things around here πŸ“
  • eph_key β€” the output buffer for the ephemerally-wrapped key. yes it's u8 eph_key[BLK_CRYPTO_MAX_HW_WRAPPED_KEY_SIZE], yes that's the whole type, no we're not shortening it πŸ’€

🌸 DESCRIPTION 🌸

so the actual tea: this one uses HWKM to re-wrap a long-term wrapped key with the per-boot ephemeral key.

that's the entire plot. key goes in long-term-wrapped, comes out ephemeral-wrapped. HWKM does the heavy lifting. no notes, she ate πŸ‘‘


πŸ’… RETURN πŸ’…

  • on success? you get the size of the resulting wrapped key. slay πŸ’–
  • if the long-term wrapped key you handed over is invalid? you get -EBADMSG. not the vibe. 😭
  • anything else? another -errno value, because the kernel loves a plot twist πŸ™ˆ

🌈 SEE ALSO 🌈

the whole squad fr fr, go read them too 🧚


and that's the page, bestie! πŸŽ€ brought to you by ./drivers/soc/qcom, dated October 2026 β€” yes, the future, we're ahead of schedule πŸ’œ mwah, study ur ICE key wrapping, ily, bye! πŸ¦‹βœ¨

πŸ“¦ where this page comes from