Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp101527pxu; Wed, 6 Jan 2021 23:00:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp8aeIKDeoIBuowDlmVqR9Z7UFq9CMueweB5GqNc79raPkrTB20L1N8EHhRp9Xz6XE/vCQ X-Received: by 2002:aa7:dacf:: with SMTP id x15mr607820eds.134.1610002833807; Wed, 06 Jan 2021 23:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610002833; cv=none; d=google.com; s=arc-20160816; b=n7BpMBkPsr01PnVBVBJQEKq7fcK3drr5JzDyFDiD02Bq7gedfjfdmBSn8i2bmjP6PM +vjud5rYoRlBDZMclXVv6P6EPnsTRjlVMJTfV7LN0dH3QaNyFaSIzRmpY5mM33D2oh9L xahC8ys8d9wGxCZXZcXvzjhXfKOfkoeeChXXU/reqhYYryMpTIkowsKmBVegPBupxXvx eYgTZU65LFIIDpHKlJpExi8hpb7oFApkB5CejdcbPhfddKmqKU/k8QeQz+9cm+13VnF6 ksQMo5WDFNr/pKrTOoTCsUyID5D2cuKg81z3j9XWW8QqOIs64jy/vGDGFTUBAR5yAJCA JLPg== 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=z2BJ11tigLCEbVgZc3512tewvlTH5faLrwRt5nvN2Nc=; b=pBsYyDac2W5JJqsPW2sKLshCy7GMgXZCwDxZ8HbcAsKqXuHGAih0mZrqkBm3Q0i1Wg 1Aj9bh2GbpJs3KmjevonA2UM30200+UzKYJH7utIbxI04apveOCyeREGzD5hQADVXEwq QLvxtjpEKIm46/zjQxxJV07GkFLD/jnUq3T6qc5aDdEQTZ6BT6HgOVATcGHb5hIz/8R5 0IF6A9tbxC93RS+nqr9sIqShqpqvVSd8T80EEpopGbBc85WONe08BhigIuscF9OhFYN6 XWoux5cfufw952qVeIshjgXE9UA34xj6V72snvtdmJ4RX9m6U6uobi24bVyj7/B4rMoy luPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LAZEVOPf; 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 e21si1874310edv.260.2021.01.06.23.00.14; Wed, 06 Jan 2021 23:00:33 -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=LAZEVOPf; 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 S1725983AbhAGHAH (ORCPT + 99 others); Thu, 7 Jan 2021 02:00:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:53220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbhAGHAH (ORCPT ); Thu, 7 Jan 2021 02:00:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 342B722E00; Thu, 7 Jan 2021 06:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610002766; bh=F+29O/lRMWzhcxDLYrF0XgcNB8oKJOS4ocekLsKW6sU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LAZEVOPfzfYtXokJbutIjBLAgx9Y8jxXVgn2OP4gERpMALuQtXgtVOMPQ2zX50nMx VEhVL846W4k0iLO+oilS7ZKN7/yoOGmat/Z27Mfxp3DscWEKrDPMOUuHMo/lMAsPdE y4BRxntzFwCKTCjDxhj6GLh90nw1y8Df5VNyjf1HwieX3yOULSxGcHcJ56xp745f1O 4jPxvORSghzuGW5b0VVZH43PC2REtDskl6IM3iPyClkXqMyKWXaJexO7SAE/+E7L6U cSUj/wa6YxUyk8ob/hBJy6o17Jj3SEDZElzThM62uje/aTUGv+0nzuSbIuP5K0Op7y k3PQ8x80yD1Ag== Date: Wed, 6 Jan 2021 22:59:24 -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: <3f8cda66411d4e82074808657df7f1bbbcff37a9.camel@chronox.de> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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. - Eric