Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1370822rwb; Wed, 14 Dec 2022 09:20:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf4LvRQk6/BL62ChRiucNgPsosEhEjIB+ANrK8a+x+gCVFD900w03cs5QA4GeZSa8x8kSOiw X-Received: by 2002:a05:6402:380a:b0:467:7b2e:88a2 with SMTP id es10-20020a056402380a00b004677b2e88a2mr20623883edb.19.1671038458528; Wed, 14 Dec 2022 09:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671038458; cv=none; d=google.com; s=arc-20160816; b=oCJJLBRUO8xm94oknpU6NJ1+InZMg+nhVasrBUg+rzWSwMT8aQ01banlrEKXM1J/Yk 8TveKHfB0Yn/sWuZUlztChs3IK0696yQGFca2yaH/2EwFxyvN4EGEmBXrutlVXCk1jt7 tlsrKVwiareZUFC4ASdPj4V0F0Te+nVXwpIJu2lSi8OHUkrcpG9Jt7pO+Vj3/aJoED+U q/qDBeFs6aVq7ahHENzKwPnEfHr5nQhx9dfEd7vl7fh/evC683W1DOlhT/afzP/hGHRO +PKifsF7G13IzKIDaj/yTMoq9hansBimF5bC887uqQj+7xfqtsn9m/w2mDuvwtowr9Zd CYqg== 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:cc:to:from :dkim-signature; bh=k1Qwm1mGot1daZL74sXy9arP1e/g+JYv/GgWeZZeVNU=; b=KeV3QIVYS6J3hHl03jUodJsj81yyPq5gkqrrtQn/6eVbIMZtRgtFSTcWEOfHijFV5w sKkM1DMXimlTkQgX9biQ9ZGcww1E4o6dNWhcIULqhLPfGJnvz+JWchJUd5Fng5f4+/AN UzQpt9OravuhlRcpNuYNDTQkBk973IWSYSc2u0SZPoHIQxiKEXx9y2Q9lBobUO2GR/OP /8l3hZCixSLgDYRvdasjAtrrBuSkWqa9Zm3eOb5Kbjzi9MzSE4DqubnF+xv/pdUGEg8i P2fmxkT3ZCEZLPuXFUXO4oDoBabhD/Vrkfuqhj8R/BW80kWsmAELQbDzhmxpYJRNQAgD 7icA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ehTPbxJt; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds9-20020a0564021cc900b0046c5b0dfea1si11624408edb.625.2022.12.14.09.20.22; Wed, 14 Dec 2022 09:20:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ehTPbxJt; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238064AbiLNRUQ (ORCPT + 99 others); Wed, 14 Dec 2022 12:20:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237720AbiLNRUL (ORCPT ); Wed, 14 Dec 2022 12:20:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BCE55B9 for ; Wed, 14 Dec 2022 09:20:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EE0C561B32 for ; Wed, 14 Dec 2022 17:20:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D34BC433F2; Wed, 14 Dec 2022 17:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671038409; bh=so7vE7Er85eybGXgDTCj8RNjfkBSc2+LLSBsEGz/lEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ehTPbxJtwUZ5KhxiNTGrGTisTxTldPaWBAARcueDCd6Kc69Tr2R2ECyToLCINxpES rodCwxIkRtXzrWlpsNCVmStNixEbE7TXNY5uMIDbFBup349QVHMxTnEuORQZAUsxCH 5yqqqnFaK0rcjA4Ep2VCTHw+0LEEDp6KE7fRdUVBOqBcK2Oy2xHNbd1+YBTiQwNTYP hxX8eLrtAH8OGgE3qwR6+ibXPEdm5rzaS6JyxltJAPlal7woEuof8ZhqrJMt4oHnsx Kbacj9DF2lwhs7b5cnsIexAn9Yvo3VdQV/QmG9nPULA7Hx0kQOfAR3Wzfljr0dGFQn W1HXOQ7YzIEVg== From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: Ard Biesheuvel , Eric Biggers , Herbert Xu Subject: [PATCH v2 3/4] crypto: tcrypt - include larger key sizes in RFC4106 benchmark Date: Wed, 14 Dec 2022 18:19:56 +0100 Message-Id: <20221214171957.2833419-4-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221214171957.2833419-1-ardb@kernel.org> References: <20221214171957.2833419-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2274; i=ardb@kernel.org; h=from:subject; bh=so7vE7Er85eybGXgDTCj8RNjfkBSc2+LLSBsEGz/lEM=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBjmgW7PtpznfCDMZUwlrWuzE59njUy7ApXKvwFg9Ds oKMH9f6JAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCY5oFuwAKCRDDTyI5ktmPJHQHDA CnPqxl9H69/LfnZIzbgVHqFFkSgcGVc4/83kjrnHD7NtJhESrOQo3PVFvkQi5ELAZipe302aRXexxu 8YC0IzL1HAO0t6qdLRk2F4kZZHjs1XWTNAiCECHIJo9LGAJ0W9S2B/Wu/XddLtkfVA8gvKHfxtZ0Y8 TpnbcClw5Bza4KnZUNsSPvR+1Uz4DTJdntCLYTshJatVUJ9EzCjIEytKGt0Qdo19MT/blg/J7Cab5Y f+Us2beEXPs9QkgLWCpJyANW+1p/Mc24nlEH4X0FtYgXTfVR2v2pw7o5jcXWenSQvZIejIyrXAI3NZ gGe9t134+fYMFCFWg9xIwViLs1pAsjdRidTd1xnrWeQ/BSZGJXmmwZn+S9lLreutNS290gnBismoO7 5lr4hHJLqUIROgl8XNHK2hw1tXYE6Z/fYB0j3cyKhEiLuEL9fWMXM0L0AqMNPxW80Rr2GX8cRE2PgG 58riYYV0NK2HaEQTnPCQZfc6EIQe4JVo7hWaunOCVwt0M= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org RFC4106 wraps AES in GCM mode, and can be used with larger key sizes than 128/160 bits, just like AES itself. So add these to the tcrypt recipe so they will be benchmarked as well. Signed-off-by: Ard Biesheuvel --- crypto/tcrypt.c | 8 ++++---- crypto/tcrypt.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index a82679b576bb4381..1e4c7699801a6ffa 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -2045,11 +2045,11 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) case 211: test_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, - NULL, 0, 16, 16, aead_speed_template_20); + NULL, 0, 16, 16, aead_speed_template_20_28_36); test_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, speed_template_16_24_32); test_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, - NULL, 0, 16, 16, aead_speed_template_20); + NULL, 0, 16, 16, aead_speed_template_20_28_36); test_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, speed_template_16_24_32); break; @@ -2075,11 +2075,11 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) case 215: test_mb_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, NULL, - 0, 16, 16, aead_speed_template_20, num_mb); + 0, 16, 16, aead_speed_template_20_28_36, num_mb); test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, speed_template_16_24_32, num_mb); test_mb_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, NULL, - 0, 16, 16, aead_speed_template_20, num_mb); + 0, 16, 16, aead_speed_template_20_28_36, num_mb); test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, speed_template_16_24_32, num_mb); break; diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 9f654677172afba7..96c843a24607105e 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h @@ -62,7 +62,7 @@ static u8 speed_template_32[] = {32, 0}; * AEAD speed tests */ static u8 aead_speed_template_19[] = {19, 0}; -static u8 aead_speed_template_20[] = {20, 0}; +static u8 aead_speed_template_20_28_36[] = {20, 28, 36, 0}; static u8 aead_speed_template_36[] = {36, 0}; /* -- 2.35.1