]> git.droids-corp.org - dpdk.git/commitdiff
crypto/cnxk: fix CMAC IV
authorTejasree Kondoj <ktejasree@marvell.com>
Mon, 20 Jun 2022 12:26:52 +0000 (17:56 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 21 Jun 2022 18:04:50 +0000 (20:04 +0200)
Fixing CMAC IV length to 16 bytes.

Fixes: 759b5e653580 ("crypto/cnxk: support AES-CMAC")
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
drivers/crypto/cnxk/cnxk_se.h

index 5c61e4dfa4005bb6b8080614b634d664292f611a..ff98d9b55385b5a26cf50bb0a7f017922209b827 100644 (file)
@@ -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;
        }
 }