On 19/11/2026 01:37, Jarkko Sakkinen wrote:

[snip]

> The exitential problem here is that KEYCTL_CRYPT_OPEN creates a circular
> relationship between the keyrings API and a specific key type.

Agreed: it should be a key_type operation, dispatched the way
KEYCTL_PKEY_* dispatches to asym_eds_op, so that keyctl knows no key
type.

> At hardware level I did not see any support for TPM, which narrows down
> the potential user base.

On a TPM system the sw backend can take its master from a TPM-sealed
trusted key, but there keycrypt adds little over a trusted key. The
users are SoCs with a TEE and often no TPM, OP-TEE on i.MX for one.

> The remaining potential user base is further reduced by those that use
> trusted keys; leaving out those who need to solve the assumed problem
> that only this patch set can presumebly sort out.
> 
> And we don't really know at this point that cut. This is pretty much
> the break down of what is wrong here.
> 
> If there is/was a problem to sort out, it should be so constrained that
> it should be as quick to describe as stepping over a nail really.

The nail: a device must encrypt and decrypt its own files, also from
a minimal initramfs, with a key that root or a kernel exploit can use
on the device but never copy off it. Trusted keys hand their users the
key's bytes (dm-crypt, encrypted keys and AF_ALG read them). CAAM's
"pk" option is the one exception, but even there a new key is drawn
in kernel memory before the CAAM wraps it, and user space reaches it
only through AF_ALG, which the kernel calls insecure and deprecated
(Documentation/crypto/userspace-if.rst, and "Userspace interface
(deprecated)" in crypto/Kconfig), privileged by default, with no
purpose bound to the key. The i.MX93 has no CAAM at all: there the key
can live in OP-TEE, and keycrypt lets the keyring use it without it
ever leaving the TA.

The stream of patch 9 has no user yet and can go.

Ciao,

Rodolfo

-- 
GNU/Linux Solutions                  e-mail: [email protected]
Linux Device Driver                          [email protected]
Embedded Systems                     phone:  +39 349 2432127
UNIX programming

Reply via email to