[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251014003231.GB2763@sol>
Date: Mon, 13 Oct 2025 17:32:31 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: linux-crypto@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
"Jason A . Donenfeld" <Jason@...c4.com>,
Vegard Nossum <vegard.nossum@...cle.com>,
Joachim Vandersmissen <git@...sn.com>,
David Howells <dhowells@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2] lib/crypto: Add FIPS self-tests for SHA-1 and SHA-2
On Fri, Oct 10, 2025 at 05:10:47PM -0700, Eric Biggers wrote:
> Add FIPS cryptographic algorithm self-tests for all SHA-1 and SHA-2
> algorithms. Following the "Implementation Guidance for FIPS 140-3"
> document, to achieve this it's sufficient to just test a single test
> vector for each of HMAC-SHA1, HMAC-SHA256, and HMAC-SHA512.
>
> Just run these tests in the initcalls, following the example of e.g.
> crypto/kdf_sp800108.c. Note that this should meet the FIPS self-test
> requirement even in the built-in case, given that the initcalls run
> before userspace, storage, network, etc. are accessible.
>
> This does not fix a regression, seeing as lib/ has had SHA-1 support
> since 2005 and SHA-256 support since 2018. Neither ever had FIPS
> self-tests. Moreover, fips=1 support has always been an unfinished
> feature upstream. However, with lib/ now being used more widely, it's
> now seeing more scrutiny and people seem to want these now.
>
> Link: https://lore.kernel.org/linux-crypto/20250917184856.GA2560@quark/
> Signed-off-by: Eric Biggers <ebiggers@...nel.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next
- Eric
Powered by blists - more mailing lists