Re: [PATCH v4 11/11] KEYS: trusted: Add asymmetric key support for TPM2

From: Jarkko Sakkinen

Date: Thu Nov 26 2026 - 16:48:57 EST


On Thu, Nov 26, 2026 at 10:50:21PM +0200, Jarkko Sakkinen wrote:
> Extend the TPM 2.0 trusted key backend to load OID_TPMLoadableKey
> (2.23.133.10.1.3) RSA (2048/3072/4096) and ECC (NIST P-256/P-384/P-521)
> keys and expose query, sign, verify, and RSA encrypt/decrypt operations
> through key_type_trusted.
>
> The feature is controlled by CONFIG_TRUSTED_KEYS_ASYMMETRIC, which
> defaults to y when CONFIG_TRUSTED_KEYS_TPM is enabled.
>
> Co-developed-by: James Prestwood <prestwoj@xxxxxxxxx>
> Signed-off-by: James Prestwood <prestwoj@xxxxxxxxx>
> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

By rebasing this on top of these patches, I could drop tpm2_read*()
from this and use tpm_buf_read_*():

https://lore.kernel.org/keyrings/20261115233156.1485238-1-jarkko@xxxxxxxxxx/

See, also:

https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/log/?h=tpm2-asymmetric

Br, Jarkko