summaryrefslogtreecommitdiff
path: root/crypto/twofish_common.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-30 00:23:53 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:16:24 +1100
commit43a1b5a0dd3450c112c84d600033be7766a55f3a (patch)
tree313368b9a4938088b60a97f78736c09f2cf28227 /crypto/twofish_common.c
parent8453222b078275dbb067c66b7ccf09e3a1c295b6 (diff)
downloadlinux-crypto-43a1b5a0dd3450c112c84d600033be7766a55f3a.tar.gz
linux-crypto-43a1b5a0dd3450c112c84d600033be7766a55f3a.zip
[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>
Diffstat (limited to 'crypto/twofish_common.c')
0 files changed, 0 insertions, 0 deletions