Skip to content

Commit

Permalink
crypto: ccm - drop unnecessary minimum 32-bit alignment
Browse files Browse the repository at this point in the history
The CCM driver forces 32-bit alignment even if the underlying ciphers
don't care about alignment. This is because crypto_xor() used to require
this, but since this is no longer the case, drop the hardcoded minimum
of 32 bits.

Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and herbertx committed Feb 15, 2017
1 parent 5338ad7 commit 5ba8e2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crypto/ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,7 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl,
ctr->base.cra_priority) / 2;
inst->alg.base.cra_blocksize = 1;
inst->alg.base.cra_alignmask = mac->base.cra_alignmask |
ctr->base.cra_alignmask |
(__alignof__(u32) - 1);
ctr->base.cra_alignmask;
inst->alg.ivsize = 16;
inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr);
inst->alg.maxauthsize = 16;
Expand Down

0 comments on commit 5ba8e2a

Please sign in to comment.