From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795903065; b=YHGwK+o+mkX2XB+FPGWgaeK/POKTSGaQBFqcLmyPG7YBeF1B3/1vs7eXIRzrBvf/x4Wr JaLfd12fOI/g31lKeMcOTIhdfn71aVkrlPSNh7y+uSx+Muzf4/3wXKF2/qh6WcyUcx34s KGfS0sdDI6JAYKVQn8mmjnAPNsz1DUZ8YijhmdZ+n/hSN6vPqgy24ITFFMjZ1jJQnAIQo Jev4aBNiomxyCtRhLnL0VBpBlPUkDn3qWANg0y4K84VzMIcFB7/Wvl1jSAvc8avHRKB53 LNxwq9jrXanVsLvtZfX78oWW30Zx2A2kble4JWZQnlru9W/ReFtdlM3ieCS9hlwXNDw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795903065; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=Y0sBSNLWplx7AYGrSw9SLGJl4EuHOZPDPIAMXBib5gE=; b=Q82M/6LwHiVYn0dinGy8jyUi0F7uxoVZEzVXNiUGZq3OlUXSfUwKNiWHcl+h/w1XpjgE DKjieLMKf1Di4jWe/Z3aiwYvspcOUUMd1NCSAjQgsD4cyGTwJ47TzyBtXRITitiy2FC/L xM5G0FrlkbEFH5sR9yCYkopWv8RhuVj6yiWnGeQ5S6QggJ39eBaG6s9lBIREGwv0C/8Wc 0ozeEvfLNHExFlDk5BWcGNOCsqMcSac2wpFGUUzW9eNYee9ODVIcOtv0JfHhWjpt96PfT OlxBDs2I1avUB89DnbokqL3tkHFbKn51tyemffqJTLlsAoZoZER6+HQLJh64WQiW+kQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VSiQm0BU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id D4D78606A325; Sat, 28 Nov 2026 21:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VSiQm0BU Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id B4CCA1F0089A; Sat, 28 Nov 2026 21:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795903065; bh=Y0sBSNLWplx7AYGrSw9SLGJl4EuHOZPDPIAMXBib5gE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VSiQm0BUrKx8wdbBANaAEuN/DF6fv6FFo3ey/ZHPGENhgXAOZxYwRJ8IxP9WeHQlv PWW4NJ+Zd/8xZFgmanQ26KdQYzqyyJXz73PzFWQIrhTwizayqxzChRk+vpIsWEge9y oFfNtbTy0VkpeFg2TnT4pWlbzvJp5xyApt9KlIxSckcQXkkfE/Y7s4Qt6exVJ5vmPl 93gMihhZfYdnFoe7UBvNpcPO6xC1W4kGMncQfb8Rph562X/Di+ch/ozGRpdwQaF0mY okGM+JA6JftTck/SplDkG5tRoGHAAth8Z0I7IKuttDK5DglXfWlwFGd5h6Nhzyc/7f WI/xLyIC2kqiw== From: Jarkko Sakkinen To: keyrings@vger.kernel.org Cc: Jarkko Sakkinen , dm-devel@lists.linux.dev, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Ahmad Fatoum , Alasdair Kergon , Andrew Morton , Benjamin Marzinski , David Gstir , David Howells , David Laight , "David S. Miller" , David Woodhouse , Eric Biggers , Herbert Xu , Ignat Korchagin , James Bottomley , James Morris , James Prestwood , Jason Gunthorpe , Jonathan Corbet , Jonathan McDowell , Lukas Wunner , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Mike Snitzer , Mikulas Patocka , Mimi Zohar , Paul Moore , Peter Huewe , Randy Dunlap , "Serge E. Hallyn" , Shuah Khan , Sumit Garg Subject: [PATCH v6 18/18] docs: trusted-encrypted: Document asymmetric trusted keys Date: Sat, 28 Nov 2026 23:56:20 +0200 Message-ID: <20261128215621.2253928-19-jarkko@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261128215621.2253928-1-jarkko@kernel.org> References: <20261128215621.2253928-1-jarkko@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- .../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