[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190817051318.GA8209@sol.localdomain>
Date: Fri, 16 Aug 2019 22:13:18 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Hans de Goede <hdegoede@...hat.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
linux-crypto@...r.kernel.org, x86@...nel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] crypto: sha256_generic - Use sha256_transform from
generic sha256 lib
On Fri, Aug 16, 2019 at 11:16:11PM +0200, Hans de Goede wrote:
> Drop the duplicate sha256_transform function from crypto/sha256_generic.c
> and use the implementation from lib/crypto/sha256.c instead.
> "diff -u lib/crypto/sha256.c sha256_generic.c"
> shows that both implementations are identical.
>
> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
Hi Hans, thanks for doing this!
I'm a little concerned that the only sha256 lib function which sha256_generic.c
calls is sha256_transform(). This means that sha256_init(), sha256_update(),
and sha256_final() are not tested by the crypto self-tests. They could be
broken and we wouldn't know.
IMO, it would be better to make sha256_generic.c use sha256_init(),
sha256_update(), and sha256_final() rather than using sha256_base.h.
Then we'd get test coverage of both the sha256 lib, and of sha256_base.h
via the architecture-specific implementations.
To do this you'll also need to add sha224_init(), sha224_update(), and
sha224_final(). But that's straightforward.
- Eric
Powered by blists - more mailing lists