summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-10-22 01:10:51 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2023-10-27 18:04:29 +0800
commit381a796a187a3c1ab477e7d1e5ea0c6aea1e9404 (patch)
tree7468e65dec11a9d15409549cbd66e5d1c8cc01df /crypto
parent36cfc05715a7ca0c989a355f173cbe6ec469c1f9 (diff)
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 <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/chacha20poly1305.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/chacha20poly1305.c b/crypto/chacha20poly1305.c
index 0e2e208d98f9..9e4651330852 100644
--- a/crypto/chacha20poly1305.c
+++ b/crypto/chacha20poly1305.c
@@ -610,8 +610,7 @@ static int chachapoly_create(struct crypto_template *tmpl, struct rtattr **tb,
inst->alg.base.cra_priority = (chacha->base.cra_priority +
poly->base.cra_priority) / 2;
inst->alg.base.cra_blocksize = 1;
- inst->alg.base.cra_alignmask = chacha->base.cra_alignmask |
- poly->base.cra_alignmask;
+ inst->alg.base.cra_alignmask = chacha->base.cra_alignmask;
inst->alg.base.cra_ctxsize = sizeof(struct chachapoly_ctx) +
ctx->saltlen;
inst->alg.ivsize = ivsize;