Skip to content
Commit 63642d5c authored by Arvind Sankar's avatar Arvind Sankar Committed by Herbert Xu
Browse files

crypto: lib/sha256 - Unroll SHA256 loop 8 times intead of 64



This reduces code size substantially (on x86_64 with gcc-10 the size of
sha256_update() goes from 7593 bytes to 1952 bytes including the new
SHA256_K array), and on x86 is slightly faster than the full unroll
(tested on Broadwell Xeon).

Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Reviewed-by: default avatarEric Biggers <ebiggers@google.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b8399819
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment