Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp233881pxb; Sat, 21 Aug 2021 00:51:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG7QqFZ2lKfqWsrv/HHBQonke77jpYHLxxJivk0rs8+cYtq1auy/SGAlpJhji5f0/nrxex X-Received: by 2002:a05:6402:546:: with SMTP id i6mr27070079edx.80.1629532259746; Sat, 21 Aug 2021 00:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629532259; cv=none; d=google.com; s=arc-20160816; b=VVEs8JoThb59Y8AQLHl+W55KuDtEHhs5egmK6AOYwDmlzBBNXZWesRWDAOM0RWH7Uq 4+24pVwBDaLTDpiCZri+YSDUabNbX5qptep+de5JDYN4ldezhMzgp7de7qMrFKdk7bg9 uKrdRy+qJtaBo1vOZQphrqi1xwFdTIG8moSGDpNq5r2/zlzW35ZYigGdQZqVwlvpI+ju B14NSvw/i+2Jq94zR7fSGRuOMFv2RBWGUS/XsnfosQdzX1IK8qUEkc+YMyLCR24sKb2m XqkBQFYZBiOPTsrfSLUON9qtHOyeXSsHXRuskp0Cyw5A7GUvId6NjzXm2j3kGX6H/R2V MvKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=X3xNpcP2wOm1ZOVfFDUaF7BdEw+QH+hCdZ7NAaHzR/U=; b=MdFh18z2ChUeE6xz/mJzQfVE/9asR2puWiOTueXJrdrjkCfPwvcjN+kgFURm3eSYAz TOvUj94bR6ZLsQ1MsahtS1GWxQDvRU2qoFcuWshzAV5OoJSE0UlHd3HQNvYEWpwJ6piv SBtWiQr8zPOb2A24IWUY4zlhdtTBfD8Ey/C23DthtlD/G34yU4OAjirT0B8DMG9OzlFB 0xZauPwIQ4Akc5oeIunzr4aTaAlzWsz1Ir7WVIxwF01ZvxoQxRYJDg2QD/bCfsS4jpiP 5Es+MZwNldwvPotiCsPfhoMr2M7rFL9XlTITBlqOq2ELH7nk/fSjmPRJijQZceCqWlTk JXNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr29si9844003ejc.256.2021.08.21.00.50.36; Sat, 21 Aug 2021 00:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233000AbhHUHvD (ORCPT + 99 others); Sat, 21 Aug 2021 03:51:03 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:53812 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbhHUHvC (ORCPT ); Sat, 21 Aug 2021 03:51:02 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mHLli-0006GF-GY; Sat, 21 Aug 2021 15:50:18 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mHLlh-0000ud-2n; Sat, 21 Aug 2021 15:50:17 +0800 Date: Sat, 21 Aug 2021 15:50:17 +0800 From: Herbert Xu To: Tianjia Zhang Cc: "David S. Miller" , Eric Biggers , Eric Biggers , Gilad Ben-Yossef , Ard Biesheuvel , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Jia Zhang , "YiLin . Li" Subject: Re: [PATCH v2 0/3] support test GCM/CCM mode for SM4 Message-ID: <20210821075017.GE3392@gondor.apana.org.au> References: <20210813075508.98854-1-tianjia.zhang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210813075508.98854-1-tianjia.zhang@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Aug 13, 2021 at 03:55:05PM +0800, Tianjia Zhang wrote: > The GCM/CCM mode of SM4 is defined in the RFC 8998 specification: > https://datatracker.ietf.org/doc/html/rfc8998 > > There are several places where the return value check of crypto_aead_setkey > and crypto_aead_setauthsize were lost. It is necessary to add these checks. > > At the same time, move the crypto_aead_setauthsize() call out of the loop, > and only need to call it once after load transform. > > --- > v2 changes: > - check the crypto_aead_setauthsize() return value > - move crypto_aead_setauthsize out of loop > - update commit message > > Tianjia Zhang (3): > crypto: tcrypt - Fix missing return value check > crypto: testmgr - Add GCM/CCM mode test of SM4 algorithm > crypto: tcrypt: add GCM/CCM mode test for SM4 algorithm > > crypto/tcrypt.c | 74 ++++++++++++++++++++---- > crypto/testmgr.c | 29 ++++++++++ > crypto/testmgr.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 241 insertions(+), 10 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt