mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "linwenkai (C)" <linwenkai6@hisilicon.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Chenghai Huang <huangchenghai2@huawei.com>, <davem@davemloft.net>,
	<linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
	<liulongfang@huawei.com>, <shenyang39@huawei.com>,
	<qianweili@huawei.com>, <wangzhou1@hisilicon.com>
Subject: Re: [PATCH v2 1/2] crypto: hisilicon/sec2 - fix for aead icv error
Date: Mon, 28 Oct 2024 10:03:40 +0800	[thread overview]
Message-ID: <aef8c5ec-4dba-4ec0-9157-6c0e02608d57@hisilicon.com> (raw)
In-Reply-To: <ZxyvT1PnY83Ilvyb@gondor.apana.org.au>


在 2024/10/26 16:58, Herbert Xu 写道:
> On Sat, Oct 26, 2024 at 03:50:58PM +0800, linwenkai (C) wrote:
>> Hi, do you want me to remove this variable and use the old way to get the
>> authsize?
> The authsize parameter is meant to be constant throughout a single
> encryption/decryption operation.  So saving a copy of it for the
> duration of that operation makes no sense.
>
> What is the actual problem that you're trying to fix?
>
> Cheers,

Hi,

In earlier version, the authsize is set to the old mac_len during 
registration and it is the max value of the algorithm,

it leads to the hardware calculates a wrong mac when the authsize is not 
equal to the maximum.

Now, the driver gets the actual authsize from crypto_aead_authsize(), 
actx->authsize can reduce the number

of calling crypto_aead_authsize, because a lot of code uses this value.

Finally If you think the variable is not needed, I can delete it and use 
crypto_aead_authsize to get it every time.

Thanks.


  reply	other threads:[~2024-10-28  2:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 10:58 [PATCH v2 0/2] crypto: hisilicon - fix the authsize and icv problems of aead in sec Chenghai Huang
2024-10-18 10:58 ` [PATCH v2 1/2] crypto: hisilicon/sec2 - fix for aead icv error Chenghai Huang
2024-10-26  6:30   ` Herbert Xu
2024-10-26  7:50     ` linwenkai (C)
2024-10-26  8:58       ` Herbert Xu
2024-10-28  2:03         ` linwenkai (C) [this message]
2024-10-28 10:35           ` Herbert Xu
2024-10-18 10:58 ` [PATCH v2 2/2] crypto: hisilicon/sec2 - fix for aead invalid authsize Chenghai Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aef8c5ec-4dba-4ec0-9157-6c0e02608d57@hisilicon.com \
    --to=linwenkai6@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=huangchenghai2@huawei.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liulongfang@huawei.com \
    --cc=qianweili@huawei.com \
    --cc=shenyang39@huawei.com \
    --cc=wangzhou1@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®