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)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 18 Jan 2022 12:03:55 +0000 (13:03 +0100)
commit9a1536b093bb5bf60689021275fd24d513bb8db0
tree47bfc2d4445f87785c45c18811941b3010aab450
parentd8d83d8ab0a453e17e68b3a3bed1f940c34b8646
lib/crypto: sha1: re-roll loops to reduce code size

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>
lib/sha1.c