diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-20 17:36:00 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-11 08:16:19 +1100 |
commit | 9825d16bd17cce605e2a21f5887341e2ad55d1ed (patch) | |
tree | f715bf87723cf2730d17e906519fdf4a9a89450a /crypto/internal.h | |
parent | f3e364dd4f2a4d3b00971b67c225cb1680074876 (diff) | |
download | linux-crypto-9825d16bd17cce605e2a21f5887341e2ad55d1ed.tar.gz linux-crypto-9825d16bd17cce605e2a21f5887341e2ad55d1ed.zip |
[CRYPTO] cbc: Require block size to be a power of 2
All common block ciphers have a block size that's a power of 2. In fact,
all of our block ciphers obey this rule.
If we require this then CBC can be optimised to avoid an expensive divide
on in-place decryption.
I've also changed the saving of the first IV in the in-place decryption
case to the last IV because that lets us use walk->iv (which is already
aligned) for the xor operation where alignment is required.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/internal.h')
0 files changed, 0 insertions, 0 deletions