Skip to content

Commit 381a796

Browse files
ebiggersherbertx
authored andcommitted
crypto: chacha20poly1305 - stop using alignmask of ahash
Now that the alignmask for ahash and shash algorithms is always 0, simplify chachapoly_create() accordingly. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 36cfc05 commit 381a796

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crypto/chacha20poly1305.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,7 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
610610
inst->alg.base.cra_priority = (chacha->base.cra_priority +
611611
poly->base.cra_priority) / 2;
612612
inst->alg.base.cra_blocksize = 1;
613-
inst->alg.base.cra_alignmask = chacha->base.cra_alignmask |
614-
poly->base.cra_alignmask;
613+
inst->alg.base.cra_alignmask = chacha->base.cra_alignmask;
615614
inst->alg.base.cra_ctxsize = sizeof(struct chachapoly_ctx) +
616615
ctx->saltlen;
617616
inst->alg.ivsize = ivsize;

0 commit comments

Comments
 (0)