android_kernel_motorola_sm6375/include/crypto
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 32ac79b096 UPSTREAM: crypto: blake2s - optimize blake2s initialization
If no key was provided, then don't waste time initializing the block
buffer, as its initial contents won't be used.

Also, make crypto_blake2s_init() and blake2s() call a single internal
function __blake2s_init() which treats the key as optional, rather than
conditionally calling blake2s_init() or blake2s_init_key().  This
reduces the compiled code size, as previously both blake2s_init() and
blake2s_init_key() were being inlined into these two callers, except
when the key size passed to blake2s() was a compile-time constant.

These optimizations aren't that significant for BLAKE2s.  However, the
equivalent optimizations will be more significant for BLAKE2b, as
everything is twice as big in BLAKE2b.  And it's good to keep things
consistent rather than making optimizations for BLAKE2b but not BLAKE2s.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

(cherry picked from commit 42ad8cf821f0d8564c393e9ad7d00a1a271d18ae)
Bug: 152722841
Bug: 178411248
Change-Id: Id057e0c8a5f0e432f227dc3deaa8997a7cbc0577
Signed-off-by: Eric Biggers <ebiggers@google.com>
2021-10-23 19:32:26 -07:00
..
internal UPSTREAM: crypto: blake2s - optimize blake2s initialization 2021-10-23 19:32:26 -07:00
acompress.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
aead.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
aes.h
akcipher.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
algapi.h
arc4.h
asym_tpm_subtype.h
authenc.h
b128ops.h
blake2s.h UPSTREAM: crypto: blake2s - optimize blake2s initialization 2021-10-23 19:32:26 -07:00
blowfish.h
cast5.h
cast6.h crypto: x86 - Regularize glue function prototypes 2021-03-20 10:39:47 +01:00
cast_common.h
cbc.h
chacha.h
cryptd.h
ctr.h
des.h
dh.h
drbg.h
ecdh.h
engine.h
gcm.h
gf128mul.h
ghash.h
hash.h This is the 5.4.118 stable release 2021-05-11 16:56:33 +02:00
hash_info.h
hmac.h
if_alg.h Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4" 2020-08-23 13:12:51 +02:00
kpp.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
md5.h
nhpoly1305.h
null.h
padlock.h
pcrypt.h
pkcs7.h
poly1305.h
public_key.h
rng.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
scatterwalk.h
serpent.h crypto: x86 - Regularize glue function prototypes 2021-03-20 10:39:47 +01:00
sha.h
sha1_base.h
sha3.h
sha256_base.h
sha512_base.h
skcipher.h crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-11 14:04:05 +02:00
sm3.h
sm3_base.h
sm4.h
streebog.h
twofish.h
xts.h crypto: x86 - Regularize glue function prototypes 2021-03-20 10:39:47 +01:00