kernel-fxtec-pro1x/include/crypto
Eric Biggers ad28c2ba43 crypto: chacha20 - Fix chacha20_block() keystream alignment (again)
[ Upstream commit a5e9f557098e54af44ade5d501379be18435bfbf ]

In commit 9f480faec5 ("crypto: chacha20 - Fix keystream alignment for
chacha20_block()"), I had missed that chacha20_block() can be called
directly on the buffer passed to get_random_bytes(), which can have any
alignment.  So, while my commit didn't break anything, it didn't fully
solve the alignment problems.

Revert my solution and just update chacha20_block() to use
put_unaligned_le32(), so the output buffer need not be aligned.
This is simpler, and on many CPUs it's the same speed.

But, I kept the 'tmp' buffers in extract_crng_user() and
_get_random_bytes() 4-byte aligned, since that alignment is actually
needed for _crng_backtrack_protect() too.

Reported-by: Stephan Müller <smueller@chronox.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 18:47:11 +01:00
..
internal
acompress.h
aead.h
aes.h
akcipher.h
algapi.h
authenc.h
b128ops.h
blowfish.h
cast5.h
cast6.h
cast_common.h
cbc.h
chacha20.h
cryptd.h
crypto_wq.h
ctr.h
des.h
dh.h
drbg.h
ecdh.h
engine.h
gcm.h
gf128mul.h
ghash.h
hash.h
hash_info.h
hmac.h
if_alg.h
kpp.h
mcryptd.h
md5.h
morus640_glue.h
morus1280_glue.h
morus_common.h
null.h
padlock.h
pcrypt.h
pkcs7.h
poly1305.h
public_key.h
rng.h
scatterwalk.h
serpent.h
sha.h
sha1_base.h
sha3.h
sha256_base.h
sha512_base.h
skcipher.h
sm3.h
sm3_base.h
sm4.h
twofish.h
xts.h