From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DB1BA0524; Thu, 7 Jan 2021 12:04:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D128140F43; Thu, 7 Jan 2021 12:04:48 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by mails.dpdk.org (Postfix) with ESMTP id 7A0F0140DFE for ; Thu, 7 Jan 2021 12:04:45 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 34F69200C0E; Thu, 7 Jan 2021 12:04:45 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7E104200CD1; Thu, 7 Jan 2021 12:04:43 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0FC8D4029B; Thu, 7 Jan 2021 12:04:40 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, akhil.goyal@nxp.com Cc: Hemant Agrawal Date: Thu, 7 Jan 2021 16:24:13 +0530 Message-Id: <20210107105416.20770-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210107105416.20770-1-hemant.agrawal@nxp.com> References: <20210107105416.20770-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/5] test/crypto: add AES-XCBC hash only test case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds test case for AES-XCBC hash only for Digest and Digest-verify Signed-off-by: Hemant Agrawal --- app/test/test_cryptodev_hash_test_vectors.h | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/app/test/test_cryptodev_hash_test_vectors.h b/app/test/test_cryptodev_hash_test_vectors.h index e261dfe36c..8b23f011e8 100644 --- a/app/test/test_cryptodev_hash_test_vectors.h +++ b/app/test/test_cryptodev_hash_test_vectors.h @@ -352,6 +352,37 @@ cmac_test_vector = { } }; +static const uint8_t aes_xcbc_mac_plain_text[32] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +}; + +static const struct blockcipher_test_data +aes_xcbc_mac_test_vector = { + .auth_algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC, + .ciphertext = { + .data = (uint8_t *)&aes_xcbc_mac_plain_text, + .len = 32 + }, + .auth_key = { + .data = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f + }, + .len = 16 + }, + .digest = { + .data = { + 0xf5, 0x4f, 0x0e, 0xc8, 0xd2, 0xb9, 0xf3, 0xd3, + 0x68, 0x07, 0x73, 0x4b, 0xd5, 0x28, 0x3f, 0xd4 + }, + .len = 16, + .truncated_len = 16 + } +}; + static const struct blockcipher_test_data null_auth_test_vector = { .auth_algo = RTE_CRYPTO_AUTH_NULL, @@ -576,6 +607,16 @@ static const struct blockcipher_test_case hash_test_cases[] = { .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, .feature_mask = BLOCKCIPHER_TEST_FEATURE_OOP, }, + { + .test_descr = "AES-XCBC-MAC Digest 16B", + .test_data = &aes_xcbc_mac_test_vector, + .op_mask = BLOCKCIPHER_TEST_OP_AUTH_GEN, + }, + { + .test_descr = "AES-XCBC-MAC Digest Verify 16B", + .test_data = &aes_xcbc_mac_test_vector, + .op_mask = BLOCKCIPHER_TEST_OP_AUTH_VERIFY, + }, }; -- 2.17.1