[v2,1/3] crypto/cnxk: fix CMAC IV

Message ID 20220620122654.1014994-2-ktejasree@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series support stream cipher chained operations |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing warning apply patch failure

Commit Message

Tejasree Kondoj June 20, 2022, 12:26 p.m. UTC
  Fixing CMAC IV length to 16 bytes.

Fixes: 759b5e653580 ("crypto/cnxk: support AES-CMAC")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/cnxk/cnxk_se.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 5c61e4dfa4..ff98d9b553 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -82,7 +82,7 @@  pdcp_iv_copy(uint8_t *iv_d, uint8_t *iv_s, const uint8_t pdcp_alg_type,
 			memcpy(iv_d, iv_s, 16);
 	} else {
 		/* AES-CMAC EIA2, microcode expects 16B zeroized IV */
-		for (j = 0; j < 4; j++)
+		for (j = 0; j < 16; j++)
 			iv_d[j] = 0;
 	}
 }