Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp107629pxu; Wed, 6 Jan 2021 23:13:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxONZVhvOq2kkCQc1PRlekhiYRuxG6XuHi66hhKdRgbwmuk3++sxjaLeQv/+F/AvcoyCPlL X-Received: by 2002:aa7:d7d8:: with SMTP id e24mr628377eds.135.1610003593724; Wed, 06 Jan 2021 23:13:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610003593; cv=none; d=google.com; s=arc-20160816; b=bVzdQur+AXhuj99rOu/lNqOE/Jx7XZeyl2stncMt69I6zr3akbgq+PLe3AzgK9CvpW Zr/bo22+HPvPK/3RZ1WCNfwGM3zcXSXBYV6jVHYnEKUvbY+XzmZtewWhvBybYByip54K YeRILR501f9rpbW0yOSgo/gRxR3LsU7MZTs8S8o74U/we2xEJIks018jQZONujE1rByK fuDgpBmA+0DNYmaO3uzaRjsjSNWXpMAGXrsKVAu6MZ9crv8N7mmh5xWargCRhOnF9igq pH62irIQ2K6kenLbm1C54SuGFudxIKgiEk3bZLzWlSMlaHSno4zfvgP4zRr8WZqld+qS 1JnQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TYN9K3WNvvQRghKej4jvDabkqKDnrhUjAebaoRHO5cM=; b=ckzlFjnZn7QOAxKPSuB6Gt+EGjbbHa1RRPGaFMeQlM8LQR0VTAzO1FPo6uOpfX2LJO b6o1fb+tW4dO9Hk9t6s29GUvecVg5kPiMdDd0PC/mc/tL/32GfCDRECQiZCcusoVDpaA 2dOAQ0nXnBthRI8NQPDBxYFH9qIRm/Oux79T46jKiCpTurjf+DKqCyjbXvqy1TSK2bet /bDoxlKOZUC4YeT2GZyWB+6PcoEf5qjOIrVxBG9U7OVyRpc3X4QEcwgfwGaR1X1hyAZU xGkdC/vhhVyXW9aRCdmeyAzU4UhVc2B0Hywy6Y1s3WVWCpCEqo5QzmDwcPFNm4iDQe5b elhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DL2cU4YR; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si1934324edi.157.2021.01.06.23.12.54; Wed, 06 Jan 2021 23:13:13 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=DL2cU4YR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbhAGHMv (ORCPT + 99 others); Thu, 7 Jan 2021 02:12:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:53974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbhAGHMu (ORCPT ); Thu, 7 Jan 2021 02:12:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D4C8230FC; Thu, 7 Jan 2021 07:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610003529; bh=tit6+iYfhOPvBLWpW1yajKmN6zgvtE2sN3jMGdZQ7Fk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DL2cU4YRLCojCqJo4Liy7B60cPapsBb3wY1eYvZlueUdgWqQrPvq83MiqxQWD5s5T 35eneD2tIuiJoRBvmD6JxrSSA4+nKOVDBbhJQZWYM2WnoAkenEx4ajJN2zW8DePY0e EnDrsb66OTSRlkVwbOKG8sRDOQNXnf40P6Z153cXY7qiHfnTJb7b3F43CmbWBnhNrq qgnn8ObKb1o9LNiKVdwJG3HmWUgaj6eNa6wMXP+JmMK0Xqc211NpGPR0NNyR/bZYGx JhlhwIRMeAlRP+Zb2oODJ0/ULifYp3iYXnHdiSFhfmeJJ3tofKFpdRAgze5YFraHVi WNzJGV6HUlA4g== Date: Wed, 6 Jan 2021 23:12:07 -0800 From: Eric Biggers To: Stephan Mueller Cc: herbert@gondor.apana.org.au, mathew.j.martineau@linux.intel.com, dhowells@redhat.com, linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org Subject: Re: [PATCH 0/5] Add KDF implementations to crypto API Message-ID: References: <4616980.31r3eYUQgx@positron.chronox.de> <3f8cda66411d4e82074808657df7f1bbbcff37a9.camel@chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jan 06, 2021 at 10:59:24PM -0800, Eric Biggers wrote: > On Thu, Jan 07, 2021 at 07:37:05AM +0100, Stephan Mueller wrote: > > Am Montag, dem 04.01.2021 um 14:20 -0800 schrieb Eric Biggers: > > > On Mon, Jan 04, 2021 at 10:45:57PM +0100, Stephan M?ller wrote: > > > > The HKDF addition is used to replace the implementation in the filesystem > > > > crypto extension. This code was tested by using an EXT4 encrypted file > > > > system that was created and contains files written to by the current > > > > implementation. Using the new implementation a successful read of the > > > > existing files was possible and new files / directories were created > > > > and read successfully. These newly added file system objects could be > > > > successfully read using the current code. Yet if there is a test suite > > > > to validate whether the invokcation of the HKDF calculates the same > > > > result as the existing implementation, I would be happy to validate > > > > the implementation accordingly. > > > > > > See https://www.kernel.org/doc/html/latest/filesystems/fscrypt.html#tests > > > for how to run the fscrypt tests.? 'kvm-xfstests -c ext4 generic/582' should > > > be > > > enough for this, though you could run all the tests if you want. > > > > I ran the $(kvm-xfstests -c encrypt -g auto) on 5.11-rc2 with and without my > > HKDF changes. I.e. the testing shows the same results for both kernels which > > seems to imply that my HKDF changes do not change the behavior. > > > > I get the following errors in both occasions - let me know if I should dig a > > bit more. > > The command you ran runs almost all xfstests with the test_dummy_encryption > mount option enabled, which is different from running the encryption tests -- > and in fact it skips the real encryption tests, so it doesn't test the > correctness of HKDF at all. It looks like you saw some unrelated test failures. > Sorry if I wasn't clear -- by "all tests" I meant all encryption tests, i.e. > 'kvm-xfstests -c ext4 -g encrypt'. Also, even the single test generic/582 > should be sufficient to test HKDF, as I mentioned. > I just did it myself and the tests pass. - Eric