From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mimi Zohar Date: Fri, 03 Aug 2018 11:58:02 +0000 Subject: Re: [PATCH v2 1/2] security/keys/secure_key: Adds the secure key support based on CAAM. Message-Id: <1533297482.4337.373.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Id: References: <20180723111432.26830-1-udit.agarwal@nxp.com> <8060.1533226481@warthog.procyon.org.uk> In-Reply-To: <8060.1533226481@warthog.procyon.org.uk> To: David Howells , Udit Agarwal Cc: zohar@linux.vnet.ibm.com, jmorris@namei.org, serge@hallyn.com, denkenz@gmail.com, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, sahil.malhotra@nxp.com, ruchika.gupta@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com On Thu, 2018-08-02 at 17:14 +0100, David Howells wrote: > Udit Agarwal wrote: > > > +===== > > +Secure Key > > +===== > > + > > +Secure key is the new type added to kernel key ring service. > > +Secure key is a symmetric type key of minimum length 32 bytes > > +and with maximum possible length to be 128 bytes. It is produced > > +in kernel using the CAAM crypto engine. Userspace can only see > > +the blob for the corresponding key. All the blobs are displayed > > +or loaded in hex ascii. > > To echo Mimi, this sounds suspiciously like it should have a generic > interface, not one that's specifically tied to one piece of hardware - > particularly if it's named with generic "secure". > > Can you convert this into a "symmetric" type and make the backend pluggable? TPM 1.2 didn't support symmetric keys.  For this reason, the TPM "unseals" the random number, used as a symmetric key, and returns the "unsealed" data to the kernel. Does anyone know if CAAM or TPM 2.0 have support for symmetric keys?  If they have symmetric key support, there would be no need for the symmetric key ever to leave the device in the clear.  The device would unseal/decrypt data, such as an encrypted key. The "symmetric" key type would be a generic interface for different devices. Mimi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76DDCC28CF6 for ; Fri, 3 Aug 2018 11:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3A6872173F for ; Fri, 3 Aug 2018 11:58:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A6872173F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727738AbeHCNyX (ORCPT ); Fri, 3 Aug 2018 09:54:23 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43486 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbeHCNyX (ORCPT ); Fri, 3 Aug 2018 09:54:23 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w73BsLrm054939 for ; Fri, 3 Aug 2018 07:58:22 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kmm85dpu0-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 03 Aug 2018 07:58:22 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Aug 2018 12:58:20 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 3 Aug 2018 12:58:15 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w73BwEt731588402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 Aug 2018 11:58:14 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E439A4057; Fri, 3 Aug 2018 14:58:24 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82C04A404D; Fri, 3 Aug 2018 14:58:22 +0100 (BST) Received: from localhost.localdomain (unknown [9.80.98.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 3 Aug 2018 14:58:22 +0100 (BST) Subject: Re: [PATCH v2 1/2] security/keys/secure_key: Adds the secure key support based on CAAM. From: Mimi Zohar To: David Howells , Udit Agarwal Cc: zohar@linux.vnet.ibm.com, jmorris@namei.org, serge@hallyn.com, denkenz@gmail.com, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, sahil.malhotra@nxp.com, ruchika.gupta@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com Date: Fri, 03 Aug 2018 07:58:02 -0400 In-Reply-To: <8060.1533226481@warthog.procyon.org.uk> References: <20180723111432.26830-1-udit.agarwal@nxp.com> <8060.1533226481@warthog.procyon.org.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18080311-0016-0000-0000-000001F099CA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080311-0017-0000-0000-00003245CC6B Message-Id: <1533297482.4337.373.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-03_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808030134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-08-02 at 17:14 +0100, David Howells wrote: > Udit Agarwal wrote: > > > +========== > > +Secure Key > > +========== > > + > > +Secure key is the new type added to kernel key ring service. > > +Secure key is a symmetric type key of minimum length 32 bytes > > +and with maximum possible length to be 128 bytes. It is produced > > +in kernel using the CAAM crypto engine. Userspace can only see > > +the blob for the corresponding key. All the blobs are displayed > > +or loaded in hex ascii. > > To echo Mimi, this sounds suspiciously like it should have a generic > interface, not one that's specifically tied to one piece of hardware - > particularly if it's named with generic "secure". > > Can you convert this into a "symmetric" type and make the backend pluggable? TPM 1.2 didn't support symmetric keys.  For this reason, the TPM "unseals" the random number, used as a symmetric key, and returns the "unsealed" data to the kernel. Does anyone know if CAAM or TPM 2.0 have support for symmetric keys?  If they have symmetric key support, there would be no need for the symmetric key ever to leave the device in the clear.  The device would unseal/decrypt data, such as an encrypted key. The "symmetric" key type would be a generic interface for different devices. Mimi From mboxrd@z Thu Jan 1 00:00:00 1970 From: zohar@linux.ibm.com (Mimi Zohar) Date: Fri, 03 Aug 2018 07:58:02 -0400 Subject: [PATCH v2 1/2] security/keys/secure_key: Adds the secure key support based on CAAM. In-Reply-To: <8060.1533226481@warthog.procyon.org.uk> References: <20180723111432.26830-1-udit.agarwal@nxp.com> <8060.1533226481@warthog.procyon.org.uk> Message-ID: <1533297482.4337.373.camel@linux.ibm.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Thu, 2018-08-02 at 17:14 +0100, David Howells wrote: > Udit Agarwal wrote: > > > +========== > > +Secure Key > > +========== > > + > > +Secure key is the new type added to kernel key ring service. > > +Secure key is a symmetric type key of minimum length 32 bytes > > +and with maximum possible length to be 128 bytes. It is produced > > +in kernel using the CAAM crypto engine. Userspace can only see > > +the blob for the corresponding key. All the blobs are displayed > > +or loaded in hex ascii. > > To echo Mimi, this sounds suspiciously like it should have a generic > interface, not one that's specifically tied to one piece of hardware - > particularly if it's named with generic "secure". > > Can you convert this into a "symmetric" type and make the backend pluggable? TPM 1.2 didn't support symmetric keys. ?For this reason, the TPM "unseals" the random number, used as a symmetric key, and returns the "unsealed" data to the kernel. Does anyone know if CAAM or TPM 2.0 have support for symmetric keys? ?If they have symmetric key support, there would be no need for the symmetric key ever to leave the device in the clear. ?The device would unseal/decrypt data, such as an encrypted key. The "symmetric" key type would be a generic interface for different devices. Mimi -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42340 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727227AbeHCNyg (ORCPT ); Fri, 3 Aug 2018 09:54:36 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w73BsJKH138334 for ; Fri, 3 Aug 2018 07:58:36 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kmne22s6y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 03 Aug 2018 07:58:35 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Aug 2018 12:58:20 +0100 Subject: Re: [PATCH v2 1/2] security/keys/secure_key: Adds the secure key support based on CAAM. From: Mimi Zohar To: David Howells , Udit Agarwal Cc: zohar@linux.vnet.ibm.com, jmorris@namei.org, serge@hallyn.com, denkenz@gmail.com, linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, sahil.malhotra@nxp.com, ruchika.gupta@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com Date: Fri, 03 Aug 2018 07:58:02 -0400 In-Reply-To: <8060.1533226481@warthog.procyon.org.uk> References: <20180723111432.26830-1-udit.agarwal@nxp.com> <8060.1533226481@warthog.procyon.org.uk> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Message-Id: <1533297482.4337.373.camel@linux.ibm.com> Sender: linux-integrity-owner@vger.kernel.org List-ID: On Thu, 2018-08-02 at 17:14 +0100, David Howells wrote: > Udit Agarwal wrote: > > > +========== > > +Secure Key > > +========== > > + > > +Secure key is the new type added to kernel key ring service. > > +Secure key is a symmetric type key of minimum length 32 bytes > > +and with maximum possible length to be 128 bytes. It is produced > > +in kernel using the CAAM crypto engine. Userspace can only see > > +the blob for the corresponding key. All the blobs are displayed > > +or loaded in hex ascii. > > To echo Mimi, this sounds suspiciously like it should have a generic > interface, not one that's specifically tied to one piece of hardware - > particularly if it's named with generic "secure". > > Can you convert this into a "symmetric" type and make the backend pluggable? TPM 1.2 didn't support symmetric keys. For this reason, the TPM "unseals" the random number, used as a symmetric key, and returns the "unsealed" data to the kernel. Does anyone know if CAAM or TPM 2.0 have support for symmetric keys? If they have symmetric key support, there would be no need for the symmetric key ever to leave the device in the clear. The device would unseal/decrypt data, such as an encrypted key. The "symmetric" key type would be a generic interface for different devices. Mimi