From patchwork Thu Jan 7 10:54:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 358161 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp389148jai; Thu, 7 Jan 2021 03:04:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxm46p+A60oVAPbaaB/yftcKtb0vf8O0RTEyaU+9rtTYnqw2OoeWkgvgDHfTY3CDfPVrUhh X-Received: by 2002:aa7:d608:: with SMTP id c8mr1249201edr.260.1610017493663; Thu, 07 Jan 2021 03:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610017493; cv=none; d=google.com; s=arc-20160816; b=hMRTZMWTDxduRzf8PMk09wpaYxUo92KGURnNVw0inWby02ZIHLQedQM3xnLDM5rqyZ MEQne1WyEJQAMo/DUqxyvFbIyar/3p7MpBg8gI/Q9OXO4Sib9GlPmgD7I4nR3MDEOV1K kBn79b7LCK0aqLkaz1unvOHbsidm7/q+1p/9DbHa9X18pVHqfWNYnts0+1yOFrRnM5Wv Ydc2nYXedrWGzsGN6RtKPXOlwtH0qW6e3McGrw7w+yHB3Ja7nJrUVu7tTQiQKnGM7jsg xERnCaK2Wq+pssokXXeKXZQ+a+hOkZ21ly+yLz7E4dgdV3viutEValJWWSA/WXehQGDb sFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=lLEi7LU/O7SAf6i4sydB3ggQ0WYC1qipLTc0ZK0Wo5c=; b=DAGMTDH8g7SzzUvJz/IacDEpeg4jLhykf59y2KZlY5V2LDiccLIqU52M7OjIeSDPQe r9vLWf1FHiNTaWJYT1McMKiLiNKEvs/XjbiHkJzgmWNQHeY36RaWUH9mCWjuHA82aElf 3UxuIORnpPQH05O1BOWdm4+K+rxBahzbnGpbVHQ8LJXWAId8sQK/THkPjNPUZtBfF6d3 ilnR/wxTSozkA9UDX12itmFJWukP9fvT276DNurm5PFwk0RDwEw7SPsUkCzPt+hUPuzL u7Gue1Oj3fMhbfAS6wlE/ZGRXV/6IBsQ4vTTIBFCcuFRhxCTqHNy+FkGN5JI7kIUverN BTOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net. [217.70.189.124]) by mx.google.com with ESMTP id d21si2140843edy.92.2021.01.07.03.04.53; Thu, 07 Jan 2021 03:04:53 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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(+) -- 2.17.1 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, + }, };