[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aef8c5ec-4dba-4ec0-9157-6c0e02608d57@hisilicon.com>
Date: Mon, 28 Oct 2024 10:03:40 +0800
From: "linwenkai (C)" <linwenkai6@...ilicon.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: Chenghai Huang <huangchenghai2@...wei.com>, <davem@...emloft.net>,
<linux-kernel@...r.kernel.org>, <linux-crypto@...r.kernel.org>,
<liulongfang@...wei.com>, <shenyang39@...wei.com>, <qianweili@...wei.com>,
<wangzhou1@...ilicon.com>
Subject: Re: [PATCH v2 1/2] crypto: hisilicon/sec2 - fix for aead icv error
在 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.
Powered by blists - more mailing lists