[PATCH v6 18/18] docs: trusted-encrypted: Document asymmetric trusted keys
From: Jarkko Sakkinen
Date: Sat Nov 28 2026 - 16:57:58 EST
Document asymmetric trusted keys and the TPM 2.0 asymmetric backend in
trusted-encrypted.rst by modularly including the kernel-doc sections,
data structures, and backend entry points from:
- include/keys/trusted-type.h
- include/keys/trusted_tpm.h
- security/keys/trusted-keys/trusted_core.c
- security/keys/trusted-keys/trusted_tpm2.c
Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
---
.../security/keys/trusted-encrypted.rst | 59 +++++++++++++++++--
1 file changed, 55 insertions(+), 4 deletions(-)
diff --git a/Documentation/security/keys/trusted-encrypted.rst b/Documentation/security/keys/trusted-encrypted.rst
index c6a507ef228a..b3aefaf4f0c2 100644
--- a/Documentation/security/keys/trusted-encrypted.rst
+++ b/Documentation/security/keys/trusted-encrypted.rst
@@ -2,9 +2,10 @@
Trusted and Encrypted Keys
==========================
-Trusted and Encrypted Keys are two new key types added to the existing kernel
-key ring service. Both of these new types are variable length symmetric keys,
-and in both cases all keys are created in the kernel, and user space sees,
+Trusted and Encrypted Keys are two key types in the kernel keyring service.
+Both types support variable-length symmetric keys generated in the kernel, and
+Trusted Keys also support loading hardware-bound asymmetric keys when
+``CONFIG_TRUSTED_KEYS_ASYMMETRIC`` is enabled. In all cases user space sees,
stores, and loads only encrypted blobs. Trusted Keys require the availability
of a Trust Source for greater security, while Encrypted Keys can be used on any
system. All user level blobs, are displayed and loaded in hex ASCII for
@@ -589,7 +590,9 @@ available are::
represents a symmetric key and must be unsealed before
use.
-The trusted key code only uses the TPM Sealed Data OID.
+The trusted key code uses TPM Sealed Data for symmetric keys and, when
+``CONFIG_TRUSTED_KEYS_ASYMMETRIC`` is enabled, TPM Loadable Key for
+asymmetric keys.
emptyAuth is true if the key has well known authorization "". If it
is false or not present, the key requires an explicit authorization
@@ -621,3 +624,51 @@ DCP Blob Format
.. kernel-doc:: security/keys/trusted-keys/trusted_dcp.c
:identifiers: struct dcp_blob_fmt
+
+Asymmetric Trusted Keys
+=======================
+
+Overview
+--------
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_core.c
+ :doc: Asymmetric Trusted Keys
+
+Backend Interface
+-----------------
+
+.. kernel-doc:: include/keys/trusted-type.h
+ :identifiers: trusted_key_payload trusted_key_ops
+
+TPM 2.0 Backend
+---------------
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_tpm2.c
+ :doc: TPM 2.0 Asymmetric Keys
+
+TPM 2.0 Parent Key Resolution
+-----------------------------
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_tpm2.c
+ :doc: TPM 2.0 Parent Key Resolution
+
+TPM 2.0 Algorithms and Encodings
+--------------------------------
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_tpm2.c
+ :doc: TPM 2.0 Asymmetric Algorithms and Encodings
+
+TPM 2.0 Machine Owner Key Example
+---------------------------------
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_tpm2.c
+ :doc: TPM 2.0 Machine Owner Key Example
+
+TPM 2.0 Driver Reference
+------------------------
+
+.. kernel-doc:: include/keys/trusted_tpm.h
+ :identifiers: trusted_key_tpm
+
+.. kernel-doc:: security/keys/trusted-keys/trusted_tpm2.c
+ :identifiers: tpm2_asym_query tpm2_asym_eds_op tpm2_asym_verify_signature
--
2.47.3