Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1229602pxb; Tue, 17 Aug 2021 06:56:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIbfU0t690CATsO8C8JE8IzU58xwnPcN4BNscmKW1qcoqJV959ijoOWfnNbn1ZgUrE3zhk X-Received: by 2002:a05:6638:304a:: with SMTP id u10mr3158377jak.62.1629208579703; Tue, 17 Aug 2021 06:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629208579; cv=none; d=google.com; s=arc-20160816; b=z/rjKTBU8DmOUcsfF3Iv3lfHuuwG3/OloWgztxH0kEpycxHo2X1XVHdGeI9RDJKmrK f/36DMTjv35mFhmzcc46eQgMQ2FMX1yiGytiGniumL7/UOTydCvoT+YpE/zSMzBzHx6d neRvzyS5CzWmVHEDrUmZn4BXQpMoUmSNyjA1T9H9QVWxEf0q2vo1RcrHN5lt9zQYO9Od 1d0qV9r8YyELdT7+zqo0DuKvFWiayuS9VZZBOrZhROyojfwRj9fCcrHwuQC6OtAPEt9s In+XsWoA6yJqK6FxXpKTXaQRzPhL5yimDycfkv6BwSztBRwo9FhV69hV30+YC2NfvF1s sErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=d5CdiPTaTbyN6eBruDpCa+DfpS0jXhFLk6hNMHqtTks=; b=Y1oBAQbA7C0ZC37Eh7tzs0PpqpIDHqQTs6XpR8O096vxwlQkbUWwnSTlwsL7oc7d1h o4/qd+AQWx+Hz0ZvIqrjJ+l6ivE70JtdPiveW0iM17r1j1UG1F/q3BIOVRoTsv2iXUIJ iXyazrp88tOTzANWtR9ygP7xmAEa20boSRJ5MoLkizypfdLoahZWWcwoUJmx2lxZrPyl +KYwErxqIe+wPNnWKxs/4rcaiOSSdby4ygd1EG3PBGZydhXWKiFovThBb4frrDbwi3FG xsnf9P7Xixp79lFNwFz+MDDCLfcw67IgwEx7Wkr9iZ/q5RWBt1z6DGztcPjYyF9xkaCA /n4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="dnX/odEz"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k21si3196983jad.56.2021.08.17.06.55.58; Tue, 17 Aug 2021 06:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="dnX/odEz"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237685AbhHQN4Q (ORCPT + 99 others); Tue, 17 Aug 2021 09:56:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:18724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234446AbhHQN4P (ORCPT ); Tue, 17 Aug 2021 09:56:15 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17HDX5Pv013840; Tue, 17 Aug 2021 09:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=d5CdiPTaTbyN6eBruDpCa+DfpS0jXhFLk6hNMHqtTks=; b=dnX/odEzbO5FT0vctTpoBElB6/bsA9T1DKMoLqiqjjtl6Sc9/5kaaLZrx+6Ynt5xjsuO NBKRmAlPQLiaeZV1ZVlVN4ZwxbAkVQ5GCRL4TWBfTvWbvhgsmBrww+fggOJ4D5qSLY3m VnFckV1X26W0OxERjHPbwxAUJx7zvCUJpy4CBPksNGxI1B117gaO4+wIubupVzkQXWdd X1TY7cBVXprgEh3/S8Q/stug1Sh3T3hG4Bo0wG/BmgHSiAe/GKyqd3F/YoMIowID5HaT EOVpn/YiMWXaJTKAfq/p8dtAkBTo4fy5I1ahwDhfrp00tGT+rTOTDz1ukuzAepAKQFSM sA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3aftx54vkk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Aug 2021 09:55:23 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 17HDXGjh014864; Tue, 17 Aug 2021 09:55:23 -0400 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 3aftx54vjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Aug 2021 09:55:22 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17HDr1Fm014483; Tue, 17 Aug 2021 13:55:21 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma03fra.de.ibm.com with ESMTP id 3ae5f8vbkw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Aug 2021 13:55:21 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17HDpoAd51446024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Aug 2021 13:51:50 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 720D8A40E9; Tue, 17 Aug 2021 13:55:18 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF9DBA4164; Tue, 17 Aug 2021 13:55:14 +0000 (GMT) Received: from li-f45666cc-3089-11b2-a85c-c57d1a57929f.ibm.com (unknown [9.160.53.55]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 17 Aug 2021 13:55:14 +0000 (GMT) Message-ID: <285cb263d9c1c16f3918c98dd36074ef16568e6d.camel@linux.ibm.com> Subject: Re: [PATCH v2] fscrypt: support trusted keys From: Mimi Zohar To: Ahmad Fatoum , Eric Biggers , Jarkko Sakkinen Cc: "Theodore Y. Ts'o" , Jaegeuk Kim , kernel@pengutronix.de, James Morris , "Serge E. Hallyn" , James Bottomley , Sumit Garg , David Howells , linux-fscrypt@vger.kernel.org, linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 17 Aug 2021 09:55:13 -0400 In-Reply-To: References: <20210806150928.27857-1-a.fatoum@pengutronix.de> <20210809094408.4iqwsx77u64usfx6@kernel.org> <20210810180636.vqwaeftv7alsodgn@kernel.org> <20210810212140.sdq5dq2wy5uaj7h7@kernel.org> <20210811001743.ofzkwdwa6rcjsf4d@kernel.org> <0e69a0aa394dd20347b06ae4e700aa17d52583ef.camel@linux.ibm.com> Content-Type: text/plain; charset="ISO-8859-15" X-Mailer: Evolution 3.28.5 (3.28.5-16.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 84Uu5U7eFAAITP33Xd2m5v2Efn7dIvZS X-Proofpoint-GUID: NuLZMrF0yc_lhQFtdjmqZyNLX9OYWT19 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-08-17_04:2021-08-17,2021-08-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 suspectscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108170082 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, 2021-08-17 at 15:04 +0200, Ahmad Fatoum wrote: > Hi, > > On 12.08.21 02:54, Mimi Zohar wrote: > > On Wed, 2021-08-11 at 10:16 -0700, Eric Biggers wrote: > > > >> Neither of you actually answered my question, which is whether the support for > >> trusted keys in dm-crypt is a mistake. I think you're saying that it is? That > >> would imply that fscrypt shouldn't support trusted keys, but rather encrypted > >> keys -- which conflicts with Ahmad's patch which is adding support for trusted > >> keys. Note that your reasoning for this is not documented at all in the > >> trusted-encrypted keys documentation; it needs to be (email threads don't really > >> matter), otherwise how would anyone know when/how to use this feature? > > > > True, but all of the trusted-encrypted key examples in the > > documentation are "encrypted" type keys, encrypted/decrypted based on a > > "trusted" type key. There are no examples of using the "trusted" key > > type directly. Before claiming that adding "trusted" key support in > > dm-crypt was a mistake, we should ask Ahmad why he felt dm-crypt needed > > to directly support "trusted" type keys. > > I wanted to persist the dm-crypt key as a sealed blob. With encrypted keys, > I would have to persist and unseal two blobs (load trusted key blob, load > encrypted key blob rooted to trusted key) with no extra benefit. > > I thus added direct support for trusted keys. Jarkko even commented on the > thread, but didn't voice objection to the approach (or agreement for that > matter), so I assumed the approach is fine. > > I can see the utility of using a single trusted key for TPMs, but for CAAM, > I see none and having an encrypted key for every trusted key just makes > it more cumbersome. > > In v1 here, I added encrypted key support as well, but dropped it for v2, > because I am not in a position to justify its use. Now that you and Eric > discussed it, should I send v3 with support for both encrypted and trusted > keys like with dm-crypt or how should we proceed? With some applications, the indirection is important. It allows the "encrypted" key type to be updated/re-encypted based on a new "trusted" key, without affecting the on disk encrypted key usage. As much as I expected, directly using "trusted" keys is a result of the new trusted key sources. I have no opinion as to whether this is/isn't a valid usecase. thanks, Mimi