Re: [RFC PATCH 0/9] KEYS: keycrypt: keys that user space can use but never read

From: Rodolfo Giometti

Date: Thu Nov 19 2026 - 13:33:43 EST


On 19/11/2026 15:33, Jarkko Sakkinen wrote:

[snip]

> And yeah, we don't have projected problems. I.e. "no users" is always
> NAK. You have to step on the nail at first.

A customer of mine stepped on it. Their product, on i.MX6, encrypts its
rootfs with dm-crypt and a CAAM black key, never in clear. Its backups,
though, are encrypted in user space with a key kept as a CAAM blob; to
use it, the blob is opened and the key handed to user space in clear.

The next generation is on i.MX93, and the customer now wants the
backups and other encrypted archives protected like the rootfs: the key
must never be in clear outside a secure world. The i.MX93 has no CAAM.
OP-TEE can hold the key, but every way the mainline keyring offers to
use it (a trusted key, through dm-crypt or AF_ALG) unseals its bytes
into kernel memory, and AF_ALG no longer reaches hardware drivers.
keycrypt's OP-TEE backend does not unseal it: a key it generates leaves
the TA only sealed.

Ciao,

Rodolfo

--
GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxx
Embedded Systems phone: +39 349 2432127
UNIX programming