diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-29 14:23:53 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 22:16:24 +0100 |
commit | 0971eb0de9446b66bd45696338f54948314db379 (patch) | |
tree | 379cd3396219f9187a23ea6c57bae62de1d4cef9 /crypto/tcrypt.h | |
parent | [CRYPTO] aes-asm: Merge common glue code (diff) | |
download | linux-0971eb0de9446b66bd45696338f54948314db379.tar.xz linux-0971eb0de9446b66bd45696338f54948314db379.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/tcrypt.h')
0 files changed, 0 insertions, 0 deletions