Re: [PATCH v2 1/2] crypto: hisilicon/sec2 - fix for aead icv error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 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.





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux