Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp716136pxu; Wed, 7 Oct 2020 14:04:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy33ERk70wmGtjyK8xr9kBQJ4EGIS+kI4r/1ZDXP/9mpY9ZpUb/gQAi3D/PLKjSPuEottTY X-Received: by 2002:a50:d613:: with SMTP id x19mr793979edi.102.1602104661422; Wed, 07 Oct 2020 14:04:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602104661; cv=none; d=google.com; s=arc-20160816; b=xrzTX1wVmzPFhhMLB/oGTdInHJs3fgRoP1v1S1J4xn6ORrORqw9/0J3Cxl+eYNMY2d RFwNQjOuyhEj7RlQlolGWmfK/Pf7ZTHh1u21NQFMD5WafGoWeoY6XS4qgV5qHlHxLNUD fjTSo/FP6ZDyZ++wag+OFtvvATeaPxXa5NzolZg/HzsHLyDoNGkP9VaQBoqPoSYTVrtV m9NELJOPOHZUBbrOpM8mHAjkyM6DuXF7kFEXvJ7wrE1T0RvtNsm4+0Oz8c7TP8HMyb3G Aggja2O995WQwzdK47wqXXGLq0D/e//FsUQ1sE+spmSBFfhjsScIs+zU69MrdDhpvclV mBhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GWys9lwjFwn3y2WLSz7/9gklVnm2rLZvAo9opNCFNxw=; b=OCfbLoF4WABvjJi1gWY+tKRzHpDxDiQZVzS9MotrgyxAV8Z9POlB6du0y2/ZZQ+ypK RtytYWZ9TWNNfsSGAW4FSDXsVgSLbdGzDbWBhUWbxeZ2FILwuivtXWkKmH9z5rp8afrr wzU/5p0Ve0J1+Yp0w9Hwc7tuzSWqAbBpRRyJuo3qlolJqjODPJq7deBKTAm7BZZCq/FZ Lh5c8yO/90GlpQpXw7YRNCrHHLdbVfYw05P24G47t8B3lAAvqWOnCcRFUuxDXAHqUplR wP8X3TTbvwYmDcuGq//flKdGr8JhTK2wf3qRaPNJHTsWKL6DODkYckhy6fEYjcpOTtcy thYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wsIcdJkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu8si2085076ejb.76.2020.10.07.14.03.57; Wed, 07 Oct 2020 14:04:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=default header.b=wsIcdJkx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbgJGVAn (ORCPT + 99 others); Wed, 7 Oct 2020 17:00:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:37258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbgJGVAm (ORCPT ); Wed, 7 Oct 2020 17:00:42 -0400 Received: from gmail.com (unknown [104.132.1.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F1C120782; Wed, 7 Oct 2020 21:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602104442; bh=GWys9lwjFwn3y2WLSz7/9gklVnm2rLZvAo9opNCFNxw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wsIcdJkx02/Jqxk4lgxxNghmKWKmf7nGpPUem6SwFDSBheWQD2Hi1eC7x3BHLBFxf ei/Is0gGRbQ4qXTA7QMZXG5EhehNR+eiAStKtP0JMC1lR6Hdz9O3poFMWmF42JxCWl O1fI67OYgM3d+jCQ6RDECZAN1PTZ/wiBPZopnKSA= Date: Wed, 7 Oct 2020 14:00:40 -0700 From: Eric Biggers To: Satya Tangirala Cc: "Theodore Y . Ts'o" , Jaegeuk Kim , Chao Yu , linux-kernel@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 0/3] add support for metadata encryption to F2FS Message-ID: <20201007210040.GB1530638@gmail.com> References: <20201005073606.1949772-1-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201005073606.1949772-1-satyat@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 07:36:03AM +0000, Satya Tangirala wrote: > This patch series adds support for metadata encryption to F2FS using > blk-crypto. This patch series needs more explanation about what "metadata encryption" is, why people will want to use it (as opposed to either not using it, or using fscrypt + dm-crypt instead), and why this is the best implementation of it. > Patch 2 introduces some functions to fscrypt that help filesystems perform > metadata encryption. Any filesystem that wants to use metadata encryption > can call fscrypt_setup_metadata_encryption() with the super_block of the > filesystem, the encryption algorithm and the descriptor of the encryption > key. The descriptor is looked up in the logon keyring of the current > session with "fscrypt:" as the prefix of the descriptor. I notice this is missing the step I suggested to include the metadata encryption key in the HKDF application-specific info string when deriving subkeys from the fscrypt master keys. The same effect could also be achieved by adding an additional level to the key hierarchy: each HKDF key would be derived from a fscrypt master key and the metadata encryption key. We need one of those, to guarantee that the file contents encryption is at least as strong as the "metadata encryption". - Eric