Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp599191rda; Sun, 22 Oct 2023 01:19:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCAV575+7TYi+gZfxVmRPessJyQZsKykR9OHlU9UT1dzScso8LQ3bFTbx7m/EY4KIzrIYu X-Received: by 2002:a05:6870:2216:b0:1e9:b82e:ba29 with SMTP id i22-20020a056870221600b001e9b82eba29mr8089238oaf.24.1697962759107; Sun, 22 Oct 2023 01:19:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697962759; cv=none; d=google.com; s=arc-20160816; b=CfhiEkOONffr31HdPD1Hf2wDxWfcuIs1/70ZpYmuPvNJDILw1EZo7V4f8kQVWnczaH zAF2ebuPZxSrIdZSCtjYJURORRx8a6zILpvxIi4O7nSH1pfTKvp8cFdTX1HE7iElEhHx sQikWPK3qAtRcq/L70jEU4Dvp+tbJPFgmn2D7xDnA47/HWk56sI1cRri+6rSnjmTXdxe DWanxc4/rTR8qJ+x5IGrMbQHseoILNaKxbzlyTmdF2Z0nqTa0LF0rT6mz0mpy4QUdSQV Kh5zeTJVvI1WO5hRx6dLgRhdBsv+AquCL+qvO1tWep2WRJzKfEjL9Qe4+KHGZBw0cyqe 7ZkA== 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=lvbBXv1HKx2VSNqgWpZL7aTBIcr5U5UYh0WD7EvtLU8=; fh=uKl1CTlin8qnxt56ErGp3UOINPCBskOXHDuKvJLDQbo=; b=zomySSvUvR044MpA+wuKOrke4xB7+0glNypKOcteu4luh5ttUjkLtJm68jmqI3uI2x 9BZ/HA4bHojejQnNVCXOxQPiaCbMgTCoR4WDuZteASHR3MNifGO1e46mgThThaKWYCQ6 Wk93xXL9u3BoviJivJfdrUjfYPZ/ApSO9mQi/OtxAG+XksU7jvy0M8oCRUbBTM1G8pZq 0r9mtI3S43C2PQ0+WGzmHsxIZHPQlPddWWS/E3mWu+iyY1GQ4fTXmuY9xmdf3chh5R7t ydDfHn5XTNSYNRUzgoI0++p49+g2uawIbk2jEz1wnm2yBpK0ql52WTh5x5bO2IXf6fRZ 6vUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OjC1btec; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 26-20020a17090a005a00b002791035445esi4695800pjb.76.2023.10.22.01.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 01:19:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OjC1btec; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id EE35F80597A3; Sun, 22 Oct 2023 01:19:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231649AbjJVITI (ORCPT + 99 others); Sun, 22 Oct 2023 04:19:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjJVISw (ORCPT ); Sun, 22 Oct 2023 04:18:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00AD13E for ; Sun, 22 Oct 2023 01:18:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53E5AC433CB for ; Sun, 22 Oct 2023 08:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697962728; bh=TVqrhoCS2w7qxwVjScgFIrOOQ/TNDwB8i4iW4nh1QUE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OjC1btectAeIxjsAkUzgd4EchM0EWoMwYfu5Vo1zOW+NdbeaI3NRpLMnuKfEccuvk mFQ1QXiAJP4fQeMUgkBzgU9Zw2cmN5kYfUCEeWDvSJdDLyq6tAS5PqPl6auUQZsFuu dmB5nXMAuckUHZgmJ/LqfqdKW589gvTz9z/6LW3aM4M66BaWelJ+H3Dfc/AS0thK2o 3P067pgZA2sVg2ScqEmI6A1FHBtfmSSPDKnH8i5BPmz/9SpxKk6VNwXOK7FWabvL2w rk5xv9ASY9iQEmz7mhLCKogXPdTiQ6yUED0ubes8vSvifxbUEgtqTrmf5oSuZCyCRa IMUUv6jYwpt9Q== From: Eric Biggers To: linux-crypto@vger.kernel.org Subject: [PATCH 22/30] crypto: gcm - stop using alignmask of ahash Date: Sun, 22 Oct 2023 01:10:52 -0700 Message-ID: <20231022081100.123613-23-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=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.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_gcm_create_common() accordingly. Signed-off-by: Eric Biggers --- crypto/gcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/gcm.c b/crypto/gcm.c index 91ce6e0e2afc1..84f7c23d14e48 100644 --- a/crypto/gcm.c +++ b/crypto/gcm.c @@ -622,22 +622,21 @@ static int crypto_gcm_create_common(struct crypto_template *tmpl, if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "gcm_base(%s,%s)", ctr->base.cra_driver_name, ghash->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) goto err_free_inst; inst->alg.base.cra_priority = (ghash->base.cra_priority + ctr->base.cra_priority) / 2; inst->alg.base.cra_blocksize = 1; - inst->alg.base.cra_alignmask = ghash->base.cra_alignmask | - ctr->base.cra_alignmask; + inst->alg.base.cra_alignmask = ctr->base.cra_alignmask; inst->alg.base.cra_ctxsize = sizeof(struct crypto_gcm_ctx); inst->alg.ivsize = GCM_AES_IV_SIZE; inst->alg.chunksize = ctr->chunksize; inst->alg.maxauthsize = 16; inst->alg.init = crypto_gcm_init_tfm; inst->alg.exit = crypto_gcm_exit_tfm; inst->alg.setkey = crypto_gcm_setkey; inst->alg.setauthsize = crypto_gcm_setauthsize; inst->alg.encrypt = crypto_gcm_encrypt; inst->alg.decrypt = crypto_gcm_decrypt; -- 2.42.0