]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: chacha20poly1305 - stop using alignmask of ahash
authorEric Biggers <ebiggers@google.com>
Sun, 22 Oct 2023 08:10:51 +0000 (01:10 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Oct 2023 10:04:29 +0000 (18:04 +0800)
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>
crypto/chacha20poly1305.c

index 0e2e208d98f942500948246bef31f0af903dcb75..9e4651330852b51415bf43700d56d831fb2c8725 100644 (file)
@@ -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;