From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6ED54A09E7; Wed, 19 Oct 2022 18:54:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE05442C41; Wed, 19 Oct 2022 18:54:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id CF79A42C3B for ; Wed, 19 Oct 2022 18:54:37 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J8B0dI010462; Wed, 19 Oct 2022 09:54:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=TuIOiJMIBNub4Ys7tAsq/R8c93q68wwW6L7GnoaW8cE=; b=fVsdpQO7Jd4PpYyc7+2+S62Peh/t/X5/I8QRbyNTTgvqRbIM4L0qtwc2gOtfy16S/BSY mPHn9xOwjM7ORA04BrAUAZmcf+pBx7k1pwADicBKzH270IHywajijyCXa5S9jLlp7cwS ww/7qq1v9p+LsD92HjIHavmJCZ4EfS7+6DsO8DPcD/5Vfkp23A762f2ySOnTFqJsJfWX sdBAKTxhdam82BQAxRkWinY0b50ebwq1XNxsWqfYh64ORrTxx3Ifs5BQHxDQH+fCGEEP dwciiwx36QqSjRhb4nLb+aExaTC5md3NynT9oTSv83dkJMWy2byTQTQLiuScv2hpgOnw LA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3kadg5a7by-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 09:54:36 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 19 Oct 2022 09:54:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 19 Oct 2022 09:54:35 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id E33953F709E; Wed, 19 Oct 2022 09:54:32 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Vidya Sagar Velumuri , Anoob Joseph , Subject: [PATCH 5/6] test/crypto: add unit tests for DES and MD5 Date: Wed, 19 Oct 2022 22:24:17 +0530 Message-ID: <20221019165418.1970445-6-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019165418.1970445-1-ktejasree@marvell.com> References: <20221019165418.1970445-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: DG_jqDTbgGxGuFdIu-n6cplgQBPYbTBg X-Proofpoint-ORIG-GUID: DG_jqDTbgGxGuFdIu-n6cplgQBPYbTBg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_09,2022-10-19_04,2022-06-22_01 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 From: Vidya Sagar Velumuri Add unit test cases for auth algo MD5. Add unit test cases for cipher DES-CBC. Signed-off-by: Vidya Sagar Velumuri --- app/test/test_cryptodev.c | 50 ++++++++++++++++++++++++ app/test/test_cryptodev_security_ipsec.h | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index c2b33686ed..96941dd55c 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -15179,6 +15179,11 @@ static struct unit_test_suite ipsec_proto_testsuite = { "Outbound known vector (ESP tunnel mode IPv4 AES-CCM 256)", ut_setup_security, ut_teardown, test_ipsec_proto_known_vec, &pkt_aes_256_ccm), + TEST_CASE_NAMED_WITH_DATA( + "Outbound known vector (ESP tunnel mode IPv4 AES-CBC MD5 [12B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, + &pkt_aes_128_cbc_md5), TEST_CASE_NAMED_WITH_DATA( "Outbound known vector (ESP tunnel mode IPv4 AES-CBC 128 HMAC-SHA256 [16B ICV])", ut_setup_security, ut_teardown, @@ -15208,6 +15213,26 @@ static struct unit_test_suite ipsec_proto_testsuite = { ut_setup_security, ut_teardown, test_ipsec_proto_known_vec, &pkt_null_aes_xcbc), + TEST_CASE_NAMED_WITH_DATA( + "Outbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA256 [16B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, + &pkt_des_cbc_hmac_sha256), + TEST_CASE_NAMED_WITH_DATA( + "Outbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA384 [24B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, + &pkt_des_cbc_hmac_sha384), + TEST_CASE_NAMED_WITH_DATA( + "Outbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA512 [32B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, + &pkt_des_cbc_hmac_sha512), + TEST_CASE_NAMED_WITH_DATA( + "Outbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec, + &pkt_des_cbc_hmac_sha256_v6), TEST_CASE_NAMED_WITH_DATA( "Outbound known vector (AH tunnel mode IPv4 HMAC-SHA256)", ut_setup_security, ut_teardown, @@ -15248,6 +15273,11 @@ static struct unit_test_suite ipsec_proto_testsuite = { "Inbound known vector (ESP tunnel mode IPv4 AES-CBC 128)", ut_setup_security, ut_teardown, test_ipsec_proto_known_vec_inb, &pkt_aes_128_cbc_null), + TEST_CASE_NAMED_WITH_DATA( + "Inbound known vector (ESP tunnel mode IPv4 AES-CBC MD5 [12B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, + &pkt_aes_128_cbc_md5), TEST_CASE_NAMED_WITH_DATA( "Inbound known vector (ESP tunnel mode IPv4 AES-CBC 128 HMAC-SHA256 [16B ICV])", ut_setup_security, ut_teardown, @@ -15277,6 +15307,26 @@ static struct unit_test_suite ipsec_proto_testsuite = { ut_setup_security, ut_teardown, test_ipsec_proto_known_vec_inb, &pkt_null_aes_xcbc), + TEST_CASE_NAMED_WITH_DATA( + "Inbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA256 [16B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, + &pkt_des_cbc_hmac_sha256), + TEST_CASE_NAMED_WITH_DATA( + "Inbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA384 [24B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, + &pkt_des_cbc_hmac_sha384), + TEST_CASE_NAMED_WITH_DATA( + "Inbound known vector (ESP tunnel mode IPv4 DES-CBC HMAC-SHA512 [32B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, + &pkt_des_cbc_hmac_sha512), + TEST_CASE_NAMED_WITH_DATA( + "Inbound known vector (ESP tunnel mode IPv6 DES-CBC HMAC-SHA256 [16B ICV])", + ut_setup_security, ut_teardown, + test_ipsec_proto_known_vec_inb, + &pkt_des_cbc_hmac_sha256_v6), TEST_CASE_NAMED_WITH_DATA( "Inbound known vector (AH tunnel mode IPv4 HMAC-SHA256)", ut_setup_security, ut_teardown, diff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h index 9147d1c0d6..b98f4741b2 100644 --- a/app/test/test_cryptodev_security_ipsec.h +++ b/app/test/test_cryptodev_security_ipsec.h @@ -196,7 +196,7 @@ static const struct crypto_param auth_list[] = { { .type = RTE_CRYPTO_SYM_XFORM_AUTH, .alg.auth = RTE_CRYPTO_AUTH_MD5_HMAC, - .key_length = 12, + .key_length = 16, .digest_length = 12, }, { -- 2.25.1