crypto/aesni_mb: fix truncated digest size for CMAC
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 14 Aug 2018 00:38:46 +0000 (01:38 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 26 Sep 2018 10:44:57 +0000 (12:44 +0200)
The truncated digest size for AES-CMAC is 12 and not 16,
as the Multi-buffer library can output both 12 and 16 bytes.

Fixes: 6491dbbecebb ("crypto/aesni_mb: support AES CMAC")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h

index cc5822a..1e297f0 100644 (file)
@@ -64,7 +64,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
                [SHA_384]       = 24,
                [SHA_512]       = 32,
                [AES_XCBC]      = 12,
-               [AES_CMAC]      = 16,
+               [AES_CMAC]      = 12,
                [AES_CCM]       = 8,
                [NULL_HASH]     = 0
 };