From: Wenkai Lin linwenkai6@hisilicon.com
Add the algorithm hmac(sm3)-cbc(sm4) to the nosva scene, the following fileds of the session setup need to be set, the calg(WCRYPTO_CIPHER_SM4), the cmode(WCRYPTO_CIPHER_CBC), the dalg(WCRYPTO_SM3) and the dmode(WCRYPTO_DIGEST_HMAC).
Signed-off-by: Wenkai Lin linwenkai6@hisilicon.com --- v1/drv/hisi_sec_udrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/v1/drv/hisi_sec_udrv.c b/v1/drv/hisi_sec_udrv.c index a4ca0d47..c7919e3c 100644 --- a/v1/drv/hisi_sec_udrv.c +++ b/v1/drv/hisi_sec_udrv.c @@ -2132,7 +2132,7 @@ static int fill_aead_bd3_alg(struct wcrypto_aead_msg *msg, sqe->a_key_len = msg->akey_bytes / SEC_SQE_LEN_RATE;
if (msg->dalg == WCRYPTO_SHA1 || msg->dalg == WCRYPTO_SHA256 || - msg->dalg == WCRYPTO_SHA512) { + msg->dalg == WCRYPTO_SHA512 || msg->dalg == WCRYPTO_SM3) { sqe->a_alg = g_hmac_a_alg[msg->dalg]; } else { WD_ERR("Invalid digest type!\n");