From patchwork Thu Jan 14 07:04:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 362814 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp237007jap; Wed, 13 Jan 2021 23:15:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxS1tEuJIUfIRNG4AQxYemzslQf3md8zsLPb/sVoqMuQMlJgRIrlOIoaL4q95cn1XCSust2 X-Received: by 2002:a05:6402:312b:: with SMTP id dd11mr4869080edb.308.1610608546142; Wed, 13 Jan 2021 23:15:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610608546; cv=none; d=google.com; s=arc-20160816; b=JrJ8DsyyrRubrTgCaJ2/O2J6AtSjIt0hYQI4IO7Fsp3Yo4k48ggjKK97NLEScmMOvJ KjD9MQOhmOIE/3mA1vUY2rt68GgIWlgKiYS2RSMDDVhmrwijPATvJZpnxtyVvNy2YOn4 PDyqRknMavd0IqXduGzQrX2FA/109oRBzlvqfaczRB2MWtJm8elvLj5emDQPcrSL2WTi D4gaJBJFOyzvXu5ENmDgcg+ycrORWg9iyXjE/Tyt6u4t0kqnotRGSzl9k/IRDXp353hs DZtVbhXqngwu5OavglwM0y2LOnkW5KJJO/T7X7dn3EBJeTguhrZycPLgdyebMMu5Z9vT pEqQ== 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:to:from; bh=c1WPVyRCaP3l5GYkVIjehcCYWOlP6ic1atf0X3fFB8k=; b=NDvq5iAmL8T7BS+Z682F+1U2n/v5MjMMpFBFc0J2pF9M8CuBZCbUhssAk28rOQaAc/ hQuG0KbdzIOnUxJOglM/s6CMf2ZGarvmF6WM+LxrrgJcqNRIyv+uABA0MD4FZP+H0Zqz BRy1AkAVOk35EebCKELWz2eRdWHkJtUn1Az4tVxXyfKa/J3Y2O2i+FOPhP4qYpUEWyC8 iFjNWZwjsLyfimdWcKvMOXStOaHwzTnGcGOZV5b1llLehfAkjNvL5Lykeh724Z6Ork/r 7tYnIkxkDYpXxgXOEyhZ/8NuTRelOR3OtQeo9nFFeY8l0qD6sYLoy1OSqgOT1w7KhQmJ X86w== 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 (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id bt25si2273975edb.572.2021.01.13.23.15.45; Wed, 13 Jan 2021 23:15:46 -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 C282D140EBA; Thu, 14 Jan 2021 08:15:45 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 0C4DA140CF5 for ; Thu, 14 Jan 2021 08:15:44 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C5DF61A119E; Thu, 14 Jan 2021 08:15:43 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8229C1A081B; Thu, 14 Jan 2021 08:15:42 +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 CD3FE402D9; Thu, 14 Jan 2021 08:15:40 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, akhil.goyal@nxp.com Date: Thu, 14 Jan 2021 12:34:59 +0530 Message-Id: <20210114070502.16033-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210114070502.16033-1-hemant.agrawal@nxp.com> References: <20210107105416.20770-1-hemant.agrawal@nxp.com> <20210114070502.16033-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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 | 35 +++++++++++++++++++++ 1 file changed, 35 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..f7a0981636 100644 --- a/app/test/test_cryptodev_hash_test_vectors.h +++ b/app/test/test_cryptodev_hash_test_vectors.h @@ -352,6 +352,31 @@ cmac_test_vector = { } }; +static const struct blockcipher_test_data +aes_xcbc_mac_test_vector = { + .auth_algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC, + .ciphertext = { + .data = plaintext_hash, + .len = 512 + }, + .auth_key = { + .data = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f + }, + .len = 16 + }, + .digest = { + .data = { + 0x07, 0xf1, 0xf5, 0x80, 0x5a, 0xbc, 0x1d, 0x1c, + 0x58, 0x43, 0x99, 0xbe + + }, + .len = 12, + .truncated_len = 12 + } +}; + static const struct blockcipher_test_data null_auth_test_vector = { .auth_algo = RTE_CRYPTO_AUTH_NULL, @@ -576,6 +601,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, + }, };