Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp599190rda; Sun, 22 Oct 2023 01:19:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFV6PGgORLLpX5shgRlZJ1GAZ8Tv+M2fEKbCAmgGurFdMi0q0QT5rUnIsUePPzKtpiAXWDm X-Received: by 2002:a17:90a:9a90:b0:27d:4ede:75b0 with SMTP id e16-20020a17090a9a9000b0027d4ede75b0mr6093414pjp.16.1697962758670; Sun, 22 Oct 2023 01:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697962758; cv=none; d=google.com; s=arc-20160816; b=K5QWbI9JnDolGZlsase7fBwl3PRRZZAR5mP6HXA+x7ZWrckvXR4hKOlRhpWtu9xFDy JQej8R7vPfGM07LjEDlw+zbzSTTUYO3wPyhi42IKyLd2cMNdEjfkJhQOqQsxgtLmtBB7 9mAcKpn9LnL/bmdjeahJ4tsiz8YRnyGaCPa0cViYxmeyqf+uSzveewixl5oBblq7c/SL CiJQVpEfMWu399iROXkrkrx3ujT6u8Cp4Yp3h2RHoAnk3jl+f/1XStm/WcxRfKj+F2bf lech8bpS5YiTt16g3Gj1sdyXRx/cPIcBat57BhSG/P/sCg3twT6/QUjqnyI4NdegNYwZ QFQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aAee4IZvzvthwnDu+cuNm9daMcbZcEwZKHQtN/kz5fQ=; fh=uKl1CTlin8qnxt56ErGp3UOINPCBskOXHDuKvJLDQbo=; b=aKS/R/zwCK153dKgDBkWiYCi2F98pslLJXXOj8fj7DhRInelZ6xz5zrMkqsp9EDzuF u2rG4Y46nuewGRBLJhI9MXXHlSSvn++pN1b+v+Xw+g3pnfeaEdZ3fOefCD1fnRUJamqN PV5UbsaAYyPd1SyGmSB9EAD2KZQNTM3Qy/jdw/f0j9QAmukIgGhWehVL+H/cZYQYGBon rlrrmWVprkToFhDTh8p0WOdhl/FjtgfybcA1qAk2TxFzz/HCslCEVX5mdnByBY9wEX6B bnc7FnRPd+vh74CO3uWgL60KWWtRuLRGNV3Jj28fQ7KbYK/SHstNjph5vE6EScb1bow5 kPuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MYY1fjaN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id pf10-20020a17090b1d8a00b00263c23a5693si5044687pjb.13.2023.10.22.01.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 01:19:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MYY1fjaN; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 3D8538057473; Sun, 22 Oct 2023 01:19:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbjJVITB (ORCPT + 99 others); Sun, 22 Oct 2023 04:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231627AbjJVISv (ORCPT ); Sun, 22 Oct 2023 04:18:51 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DB1BDD for ; Sun, 22 Oct 2023 01:18:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDB4DC433CD for ; Sun, 22 Oct 2023 08:18:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697962727; bh=vv+DmIoq1Yu+1izodwo+C0qCNOAzfQxHxI0uOGd0dFk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MYY1fjaNu7s9sE7aWGuJXLeZS+yn9uoA5lDjiXby4IAJ/7W3FSNHrSTgWOfovQv9/ k4TSxog0Z5k+zEhD3zRyksfddh/phJFgSTdh8P7OB8DMhacNCQMlqQFZDqaG3NyALV NSNWzWD4lpJoyPtBsStTngMYY0TnSerxqE9UPYDDRU5XJ96JLuUq2anxMbSCdV3IBE 3I7CB792/dwkSPVvNHbgLDwO9UiO3BlydMBgOak7WmizXmua26Sm0/WFZgsHhIF2Uj vAdMJw+8aJE9Qz+u3InQ0H2hgTEZBPmmnt+6+WqaIhflj/NW6DV1uIvFxzJzmS/h00 v7dhsHEYS7zYg== From: Eric Biggers To: linux-crypto@vger.kernel.org Subject: [PATCH 20/30] crypto: ccm - stop using alignmask of ahash Date: Sun, 22 Oct 2023 01:10:50 -0700 Message-ID: <20231022081100.123613-21-ebiggers@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231022081100.123613-1-ebiggers@kernel.org> References: <20231022081100.123613-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 22 Oct 2023 01:19:16 -0700 (PDT) From: Eric Biggers Now that the alignmask for ahash and shash algorithms is always 0, simplify crypto_ccm_create_common() accordingly. Signed-off-by: Eric Biggers --- crypto/ccm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/ccm.c b/crypto/ccm.c index dd7aed63efc93..36f0acec32e19 100644 --- a/crypto/ccm.c +++ b/crypto/ccm.c @@ -497,22 +497,21 @@ static int crypto_ccm_create_common(struct crypto_template *tmpl, goto err_free_inst; if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "ccm_base(%s,%s)", ctr->base.cra_driver_name, mac->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) goto err_free_inst; inst->alg.base.cra_priority = (mac->base.cra_priority + ctr->base.cra_priority) / 2; inst->alg.base.cra_blocksize = 1; - inst->alg.base.cra_alignmask = mac->base.cra_alignmask | - ctr->base.cra_alignmask; + inst->alg.base.cra_alignmask = ctr->base.cra_alignmask; inst->alg.ivsize = 16; inst->alg.chunksize = ctr->chunksize; inst->alg.maxauthsize = 16; inst->alg.base.cra_ctxsize = sizeof(struct crypto_ccm_ctx); inst->alg.init = crypto_ccm_init_tfm; inst->alg.exit = crypto_ccm_exit_tfm; inst->alg.setkey = crypto_ccm_setkey; inst->alg.setauthsize = crypto_ccm_setauthsize; inst->alg.encrypt = crypto_ccm_encrypt; inst->alg.decrypt = crypto_ccm_decrypt; -- 2.42.0