public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	herbert@gondor.apana.org.au, gaochao <gaochao49@huawei.com>,
	Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH crypto] crypto: blake2s - remove shash module
Date: Thu, 26 May 2022 11:01:34 -0700	[thread overview]
Message-ID: <Yo/Afs61tFwnaOV8@sol.localdomain> (raw)
In-Reply-To: <20220526092026.207936-1-Jason@zx2c4.com>

On Thu, May 26, 2022 at 11:20:26AM +0200, Jason A. Donenfeld wrote:
> BLAKE2s has no use as an shash and no use is likely to ever come up.

I'm not sure about that.  Anyone who is already using shash (for supporting
multiple algorithms) and wants to add blake2s support would need it.  dm-verity,
dm-integrity, fs-verity, UBIFS authentication, IMA, btrfs checksums, etc.  A
couple of these are already using blake2b, even.  I guess you might as well
remove blake2s until someone explicitly says they want it, but I can easily see
it coming back later.

> Just remove all of this unnecessary plumbing. Removing this shash was
> something we talked about back when we were making BLAKE2s a built-in,
> but I simply never got around to doing it. So this completes that
> project.
> 
> This also helps fix a bug in which the lib code depends on
> crypto_simd_disabled_for_test, which is now unnecessary.
> 
> Cc: gaochao <gaochao49@huawei.com>
> Cc: Eric Biggers <ebiggers@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

More importantly, this is removing quite a bit of test coverage because the
extra self-tests in crypto/testmgr.c are more comprehensive than what
lib/crypto/blake2s-selftest.c does.  For example they test the case where the
input data is misaligned, as well as the case where the code is executed in a
context where SIMD instructions are unavailable.

In order for this to be acceptable, I think you'd need to update
blake2s-selftest.c to be more comprehensive.

- Eric

  reply	other threads:[~2022-05-26 18:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26  9:20 [PATCH crypto] crypto: blake2s - remove shash module Jason A. Donenfeld
2022-05-26 18:01 ` Eric Biggers [this message]
2022-05-27  8:05   ` Jason A. Donenfeld
2022-05-27  8:11     ` [PATCH crypto v2] " Jason A. Donenfeld
2022-05-27 12:36       ` David Laight
2022-05-27 13:20         ` Jason A. Donenfeld
2022-05-28  3:59       ` Eric Biggers
2022-05-28  9:57         ` Jason A. Donenfeld
2022-05-28 10:07           ` [PATCH crypto v3] " Jason A. Donenfeld
2022-05-28 17:19           ` [PATCH crypto v2] " Eric Biggers
2022-05-28 19:33             ` Jason A. Donenfeld
2022-05-28 19:44               ` [PATCH crypto v4] " Jason A. Donenfeld
2022-06-10  9:16                 ` Herbert Xu
2022-05-30  7:37             ` [PATCH crypto v2] " David Laight
2022-05-30  7:54               ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yo/Afs61tFwnaOV8@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=gaochao49@huawei.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox