lib/crypto: sha1: re-roll loops to reduce code size
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 11 Jan 2022 17:58:43 +0000 (18:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 May 2022 07:28:59 +0000 (09:28 +0200)
commitb0cdd9ec844515d65000f0fc133a4badf661c519
tree9314d76ea3123e7d4544919e2ce88e2f6489baf8
parentcba2195416d4c0719ba80fc2182ffa3cee71fb24
lib/crypto: sha1: re-roll loops to reduce code size

commit 9a1536b093bb5bf60689021275fd24d513bb8db0 upstream.

With SHA-1 no longer being used for anything performance oriented, and
also soon to be phased out entirely, we can make up for the space added
by unrolled BLAKE2s by simply re-rolling SHA-1. Since SHA-1 is so much
more complex, re-rolling it more or less takes care of the code size
added by BLAKE2s. And eventually, hopefully we'll see SHA-1 removed
entirely from most small kernel builds.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/sha1.c