From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0275CC433F5 for ; Thu, 26 May 2022 18:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233752AbiEZSBk (ORCPT ); Thu, 26 May 2022 14:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233423AbiEZSBj (ORCPT ); Thu, 26 May 2022 14:01:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 750582AC68; Thu, 26 May 2022 11:01:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 320D4B8210C; Thu, 26 May 2022 18:01:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF361C385A9; Thu, 26 May 2022 18:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653588095; bh=d5ypGyznvLK36nBsMgVlsQ0dlUUAR350qlCPdJGQD5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cyh0X/e8V+zwQVgpwPJOgEryDaxWCAtc6B2VF6H/69jF9cNYE70zkBfcAtw9911BY FCBYOx+J2x5HZmbuJOqGtQiV3ggfvrYSARie5umdupxqEVAIiZs1WKzBNgEUo4WDj/ FQ/p7p1wm74QbnItpoRQqaiARE+3Ytde7wW6AaowubTC9rkxYVHXdoqX17Bj59pOtb WZeQA+yFQDyICnLqVbbn0S+QIJFsPr/Jp8LpU7tEA/eqdZJGiTri9kixoftrjtKcIA wCiGMWqNB31YfnSy/5QXiYN49TfazTTYccdGFDh3eByv2cD+RnHqA/pFy6lfnTinPK 6Krq+DN13KUCw== Date: Thu, 26 May 2022 11:01:34 -0700 From: Eric Biggers To: "Jason A. Donenfeld" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, gaochao , Ard Biesheuvel Subject: Re: [PATCH crypto] crypto: blake2s - remove shash module Message-ID: References: <20220526092026.207936-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220526092026.207936-1-Jason@zx2c4.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 > Cc: Eric Biggers > Cc: Ard Biesheuvel > Signed-off-by: Jason A. Donenfeld 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