linux-stable/lib/crypto
Arvind Sankar b8399819b2 crypto: lib/sha256 - Clear W[] in sha256_update() instead of sha256_transform()
The temporary W[] array is currently zeroed out once every call to
sha256_transform(), i.e. once every 64 bytes of input data. Moving it to
sha256_update() instead so that it is cleared only once per update can
save about 2-3% of the total time taken to compute the digest, with a
reasonable memset() implementation, and considerably more (~20%) with a
bad one (eg the x86 purgatory currently uses a memset() coded in C).

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-10-30 17:35:03 +11:00
..
aes.c crypto: aes - helper function to validate key length for AES algorithms 2019-08-09 15:11:43 +10:00
arc4.c
blake2s-generic.c crypto: blake2s - generic C library implementation and selftest 2019-11-17 09:02:42 +08:00
blake2s-selftest.c crypto: blake2s - generic C library implementation and selftest 2019-11-17 09:02:42 +08:00
blake2s.c crypto: blake2s - generic C library implementation and selftest 2019-11-17 09:02:42 +08:00
chacha.c crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h 2020-05-08 15:32:17 +10:00
chacha20poly1305-selftest.c crypto: arm64/chacha - correctly walk through blocks 2020-03-20 14:35:27 +11:00
chacha20poly1305.c crypto: lib/chacha20poly1305 - Set SG_MITER_ATOMIC unconditionally 2020-09-25 17:48:13 +10:00
curve25519-fiat32.c crypto: lib/curve25519 - work around Clang stack spilling issue 2019-11-17 09:02:43 +08:00
curve25519-generic.c crypto: curve25519 - Fix selftest build error 2020-01-16 15:18:13 +08:00
curve25519-hacl64.c crypto: curve25519 - generic C library implementations 2019-11-17 09:02:43 +08:00
curve25519-selftest.c crypto: lib/curve25519 - re-add selftests 2019-12-27 18:18:03 +08:00
curve25519.c crypto: curve25519 - Fix selftest build error 2020-01-16 15:18:13 +08:00
des.c crypto: des - split off DES library from generic DES cipher driver 2019-08-22 14:57:33 +10:00
Kconfig crypto: x86/poly1305 - wire up faster implementations for kernel 2020-01-16 15:18:12 +08:00
libchacha.c crypto: chacha - move existing library code into lib/crypto 2019-11-17 09:02:39 +08:00
Makefile crypto: curve25519 - Fix selftest build error 2020-01-16 15:18:13 +08:00
poly1305-donna32.c crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
poly1305-donna64.c crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
poly1305.c crypto: poly1305 - add new 32 and 64-bit generic versions 2020-01-16 15:18:12 +08:00
sha256.c crypto: lib/sha256 - Clear W[] in sha256_update() instead of sha256_transform() 2020-10-30 17:35:03 +11:00