diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-09-29 09:24:23 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:46 -0400 |
commit | 70613783fc0f6e37b442d79e8417f71a2b71ed93 (patch) | |
tree | 94cf5beb318c16e608fb7e03d4eed7decaaeefc1 /crypto/algapi.c | |
parent | e4c5c6c9b0d04a7dac19027260f7421305a34856 (diff) |
[CRYPTO] blkcipher: Remove alignment restriction on block size
Previously we assumed for convenience that the block size is a multiple of
the algorithm's required alignment. With the pending addition of CTR this
will no longer be the case as the block size will be 1 due to it being a
stream cipher. However, the alignment requirement will be that of the
underlying implementation which will most likely be greater than 1.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index d891f56f0e8c..58cc19164801 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -63,9 +63,6 @@ static int crypto_check_alg(struct crypto_alg *alg) | |||
63 | if (alg->cra_alignmask & (alg->cra_alignmask + 1)) | 63 | if (alg->cra_alignmask & (alg->cra_alignmask + 1)) |
64 | return -EINVAL; | 64 | return -EINVAL; |
65 | 65 | ||
66 | if (alg->cra_alignmask & alg->cra_blocksize) | ||
67 | return -EINVAL; | ||
68 | |||
69 | if (alg->cra_blocksize > PAGE_SIZE / 8) | 66 | if (alg->cra_blocksize > PAGE_SIZE / 8) |
70 | return -EINVAL; | 67 | return -EINVAL; |
71 | 68 | ||