android_kernel_xiaomi_sm8350/crypto
Herbert Xu 0971eb0de9 [CRYPTO] ctr: Fix multi-page processing
When the data spans across a page boundary, CTR may incorrectly process
a partial block in the middle because the blkcipher walking code may
supply partial blocks in the middle as long as the total length of the
supplied data is more than a block.  CTR is supposed to return any unused
partial block in that case to the walker.

This patch fixes this by doing exactly that, returning partial blocks to
the walker unless we received less than a block-worth of data to start
with.

This also allows us to optimise the bulk of the processing since we no
longer have to worry about partial blocks until the very end.

Thanks to Tan Swee Heng for fixes and actually testing this :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11 08:16:24 +11:00
..
async_tx
ablkcipher.c
aead.c
aes_generic.c [CRYPTO] aes-generic: Make key generation exportable 2008-01-11 08:16:09 +11:00
algapi.c [CRYPTO] api: Add crypto_inc and crypto_xor 2008-01-11 08:16:17 +11:00
anubis.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
api.c crypto: convert "crypto" subdirectory to UTF-8 2007-10-19 23:06:17 +02:00
arc4.c
authenc.c [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type 2008-01-11 08:16:15 +11:00
blkcipher.c [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type 2008-01-11 08:16:15 +11:00
blowfish.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
camellia.c [CRYPTO] camellia: Move more common code into camellia_setup_tail 2008-01-11 08:16:22 +11:00
cast5.c
cast6.c
cbc.c [CRYPTO] cbc: Require block size to be a power of 2 2008-01-11 08:16:19 +11:00
cipher.c
compress.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
crc32c.c
cryptd.c [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type 2008-01-11 08:16:15 +11:00
crypto_null.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
cryptomgr.c [CRYPTO] cryptomgr: Fix parsing of recursive algorithms 2007-10-10 16:55:45 -07:00
ctr.c [CRYPTO] ctr: Fix multi-page processing 2008-01-11 08:16:24 +11:00
deflate.c
des_generic.c [CRYPTO] hifn_795x: Detect weak keys 2008-01-11 08:16:03 +11:00
digest.c [CRYPTO] scatterwalk: Use generic scatterlist chaining 2008-01-11 08:16:14 +11:00
ecb.c
fcrypt.c crypto: convert "crypto" subdirectory to UTF-8 2007-10-19 23:06:17 +02:00
gcm.c [CRYPTO] gcm: New algorithm 2008-01-11 08:16:23 +11:00
gf128mul.c [CRYPTO] xts: XTS blockcipher mode implementation without partial blocks 2007-10-10 16:55:45 -07:00
hash.c
hmac.c [CRYPTO] scatterwalk: Use generic scatterlist chaining 2008-01-11 08:16:14 +11:00
internal.h [CRYPTO] api: Kill crypto_km_types 2007-10-10 16:55:44 -07:00
Kconfig [CRYPTO] gcm: New algorithm 2008-01-11 08:16:23 +11:00
khazad.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
lrw.c
Makefile [CRYPTO] gcm: New algorithm 2008-01-11 08:16:23 +11:00
md4.c
md5.c
michael_mic.c
pcbc.c [CRYPTO] pcbc: Use crypto_xor 2008-01-11 08:16:19 +11:00
proc.c
salsa20_generic.c [CRYPTO] salsa20: Salsa20 stream cipher 2008-01-11 08:16:15 +11:00
scatterwalk.c [CRYPTO] scatterwalk: Use generic scatterlist chaining 2008-01-11 08:16:14 +11:00
scatterwalk.h [CRYPTO] scatterwalk: Use generic scatterlist chaining 2008-01-11 08:16:14 +11:00
seed.c
serpent.c
sha1_generic.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
sha256_generic.c [CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224 2008-01-11 08:16:12 +11:00
sha512.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
tcrypt.c [CRYPTO] gcm: New algorithm 2008-01-11 08:16:23 +11:00
tcrypt.h [CRYPTO] gcm: New algorithm 2008-01-11 08:16:23 +11:00
tea.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
tgr192.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
twofish_common.c [CRYPTO] twofish: Do not unroll big stuff in twofish key setup 2008-01-11 08:16:06 +11:00
twofish.c
wp512.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
xcbc.c [SG] Update crypto/ to sg helpers 2007-10-22 19:40:16 +02:00
xor.c
xts.c [CRYPTO] xts: XTS blockcipher mode implementation without partial blocks 2007-10-10 16:55:45 -07:00