From patchwork Tue Jun 16 16:02:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 11608127 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E822912 for ; Tue, 16 Jun 2020 16:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47BCD207C4 for ; Tue, 16 Jun 2020 16:03:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="l1PY5mij" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731004AbgFPQDD (ORCPT ); Tue, 16 Jun 2020 12:03:03 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:42532 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732605AbgFPQC7 (ORCPT ); Tue, 16 Jun 2020 12:02:59 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id E5FF08EE2A2; Tue, 16 Jun 2020 09:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1592323378; bh=Fz12vh02KycNYIOJCKhsfJaZIhTY3QwTSSkaJlEmPFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l1PY5mijlXlAG4y+tYUSVV/gnqgWfGxqS92SnzR4Oh/GpW2fYKcNG4kvCW9rnkg4P OjnZiZV0DS+Y83QnRngkazcxBnum8fMR0RZqFeLlh70mNhBCnCOmVirK4VV6ouQ08j Tp5xQn9OfdmkD8wXdWD9b2l441Fz7sCDWzHsA274= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8ZUCiuvilyCe; Tue, 16 Jun 2020 09:02:58 -0700 (PDT) Received: from jarvis.int.hansenpartnership.com (jarvis.ext.hansenpartnership.com [153.66.160.226]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id E44A88EE188; Tue, 16 Jun 2020 09:02:57 -0700 (PDT) From: James Bottomley To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , Jarkko Sakkinen , David Woodhouse , keyrings@vger.kernel.org, David Howells Subject: [PATCH v10 2/8] oid_registry: Add TCG defined OIDS for TPM keys Date: Tue, 16 Jun 2020 09:02:23 -0700 Message-Id: <20200616160229.8018-3-James.Bottomley@HansenPartnership.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200616160229.8018-1-James.Bottomley@HansenPartnership.com> References: <20200616160229.8018-1-James.Bottomley@HansenPartnership.com> MIME-Version: 1.0 Sender: keyrings-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: keyrings@vger.kernel.org The TCG has defined an OID prefix "2.23.133.10.1" for the various TPM key uses. We've defined three of the available numbers: 2.23.133.10.1.3 TPM Loadable key. This is an asymmetric key (Usually RSA2048 or Elliptic Curve) which can be imported by a TPM2_Load() operation. 2.23.133.10.1.4 TPM Importable Key. This is an asymmetric key (Usually RSA2048 or Elliptic Curve) which can be imported by a TPM2_Import() operation. Both loadable and importable keys are specific to a given TPM, the difference is that a loadable key is wrapped with the symmetric secret, so must have been created by the TPM itself. An importable key is wrapped with a DH shared secret, and may be created without access to the TPM provided you know the public part of the parent key. 2.23.133.10.1.5 TPM Sealed Data. This is a set of data (up to 128 bytes) which is sealed by the TPM. It usually represents a symmetric key and must be unsealed before use. The ASN.1 binary key form starts of with this OID as the first element of a sequence, giving the binary form a unique recognizable identity marker regardless of encoding. Signed-off-by: James Bottomley Acked-by: Jarkko Sakkinen Reviewed-by: David Howells --- v3: correct OID_TPMImportableKey name v7: add ack v9: add review --- include/linux/oid_registry.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/oid_registry.h b/include/linux/oid_registry.h index 657d6bf2c064..f6e2276e5f30 100644 --- a/include/linux/oid_registry.h +++ b/include/linux/oid_registry.h @@ -107,6 +107,11 @@ enum OID { OID_gostTC26Sign512B, /* 1.2.643.7.1.2.1.2.2 */ OID_gostTC26Sign512C, /* 1.2.643.7.1.2.1.2.3 */ + /* TCG defined OIDS for TPM based keys */ + OID_TPMLoadableKey, /* 2.23.133.10.1.3 */ + OID_TPMImportableKey, /* 2.23.133.10.1.4 */ + OID_TPMSealedData, /* 2.23.133.10.1.5 */ + OID__NR };