crypto: hisilicon/sec2 - fix for aead icv error
authorWenkai Lin <linwenkai6@hisilicon.com>
Fri, 13 Dec 2024 09:13:34 +0000 (17:13 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Dec 2024 14:46:24 +0000 (22:46 +0800)
commitfd337f852b2677b53d0859a47b58e6e6bd189f30
treed4be55d4197e122f8f0a743f9a400c66d5a02b79
parent3cd46a78eeee8f1be545492a9de6dc37cd7d69d9
crypto: hisilicon/sec2 - fix for aead icv error

When the AEAD algorithm is used for encryption or decryption,
the input authentication length varies, the hardware needs to
obtain the input length to pass the integrity check verification.
Currently, the driver uses a fixed authentication length,which
causes decryption failure, so the length configuration is modified.
In addition, the step of setting the auth length is unnecessary,
so it was deleted from the setkey function.

Fixes: 2f072d75d1ab ("crypto: hisilicon - Add aead support on SEC2")
Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com>
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec2/sec.h
drivers/crypto/hisilicon/sec2/sec_crypto.c
drivers/crypto/hisilicon/sec2/sec_crypto.h