Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/59456/?format=api
https://patches.dpdk.org/api/patches/59456/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190919121510.4911-2-michaelsh@marvell.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190919121510.4911-2-michaelsh@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190919121510.4911-2-michaelsh@marvell.com", "date": "2019-09-19T12:15:08", "name": "[v2,1/3] examples/fips_validation: added support for TDES ECB", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4fa3b963e13087583fdd7b52d8ce334b3e1095d7", "submitter": { "id": 1399, "url": "https://patches.dpdk.org/api/people/1399/?format=api", "name": "Michael Shamis", "email": "michaelsh@marvell.com" }, "delegate": { "id": 6690, "url": "https://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190919121510.4911-2-michaelsh@marvell.com/mbox/", "series": [ { "id": 6452, "url": "https://patches.dpdk.org/api/series/6452/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6452", "date": "2019-09-19T12:15:07", "name": "Support ECB for AES and TDES", "version": 2, "mbox": "https://patches.dpdk.org/series/6452/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/59456/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/59456/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 069731EF31;\n\tThu, 19 Sep 2019 13:56:46 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 3525B1ED22\n\tfor <dev@dpdk.org>; Thu, 19 Sep 2019 13:56:43 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx8JBu9Qa006990; Thu, 19 Sep 2019 04:56:42 -0700", "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2v3vcdtre4-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 19 Sep 2019 04:56:42 -0700", "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tThu, 19 Sep 2019 04:56:41 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Thu, 19 Sep 2019 04:56:41 -0700", "from vvenus375.il.marvell.com (unknown [10.5.120.75])\n\tby maili.marvell.com (Postfix) with ESMTP id 8C2363F7041;\n\tThu, 19 Sep 2019 04:56:39 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=uoolYJqTZtYxJpF7r5DUAtSVLrJJOc4vBr3OFodIJkE=;\n\tb=difCoDIKRFgYP7JeKgo297K07oz5rSRiAnS35fHafkkDvfXWwDmjVYv2X03OEaIiHt0c\n\tiorltZVVTpI9dHkLx5/ILjPVvhmcXZW5crTC1aqAkU41oQioNLh7dUOSn2tyFpJl0kFb\n\trvXYhF3YczCcUQf/gdJkXT3W2dctOVnAEFl5CjSQ9ISXtUhj/N9nTblLAoBIGW0uqiwn\n\tnjrlUxI1YaiVl+BhIcanoPpVj2MvF7SyX5DW9cWOk35hLxTp2P7M+PENFxRtLykRPrYM\n\tA/xy/fGHoBHCtsBiYed7wY0zgwWaJ+SojyTp3462JZ+hKZnS7jkyOHtoHVc1vDZx35to\n\tLg== ", "From": "<michaelsh@marvell.com>", "To": "<akhil.goyal@nxp.com>", "CC": "<dev@dpdk.org>, <marko.kovacevic@intel.com>, <lironh@marvell.com>,\n\t<michaelsh@marvell.com>", "Date": "Thu, 19 Sep 2019 15:15:08 +0300", "Message-ID": "<20190919121510.4911-2-michaelsh@marvell.com>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20190919121510.4911-1-michaelsh@marvell.com>", "References": "<20190826094120.22590-1-michaelsh@marvell.com>\n\t<20190919121510.4911-1-michaelsh@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.70,1.0.8\n\tdefinitions=2019-09-19_04:2019-09-19,2019-09-19 signatures=0", "Subject": "[dpdk-dev] [PATCH v2 1/3] examples/fips_validation: added support\n\tfor TDES ECB", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Michael Shamis <michaelsh@marvell.com>\n\nSigned-off-by: Michael Shamis <michaelsh@marvell.com>\n---\n examples/fips_validation/fips_validation.c | 1 +\n examples/fips_validation/fips_validation.h | 7 +++++\n .../fips_validation/fips_validation_tdes.c | 7 +++++\n examples/fips_validation/main.c | 27 ++++++++++++++++---\n 4 files changed, 38 insertions(+), 4 deletions(-)", "diff": "diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c\nindex 8d43b267e..07ffa62e9 100644\n--- a/examples/fips_validation/fips_validation.c\n+++ b/examples/fips_validation/fips_validation.c\n@@ -257,6 +257,7 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,\n \n \tfips_test_clear();\n \n+\tstrcpy(info.file_name, req_file_path);\n \tinfo.algo = FIPS_TEST_ALGO_MAX;\n \tif (parse_file_type(req_file_path) < 0) {\n \t\tRTE_LOG(ERR, USER1, \"File %s type not supported\\n\",\ndiff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h\nindex b604db9ec..d487fb005 100644\n--- a/examples/fips_validation/fips_validation.h\n+++ b/examples/fips_validation/fips_validation.h\n@@ -105,6 +105,11 @@ enum fips_tdes_test_types {\n \tTDES_MMT /* Multi block Message Test */\n };\n \n+enum fips_tdes_test_mode {\n+\tTDES_MODE_CBC = 0,\n+\tTDES_MODE_ECB\n+};\n+\n enum fips_ccm_test_types {\n \tCCM_VADT\t= 1, /* Variable Associated Data Test */\n \tCCM_VPT,\t\t /* Variable Payload Test */\n@@ -130,6 +135,7 @@ struct hmac_interim_data {\n \n struct tdes_interim_data {\n \tenum fips_tdes_test_types test_type;\n+\tenum fips_tdes_test_mode test_mode;\n \tuint32_t nb_keys;\n };\n \n@@ -156,6 +162,7 @@ struct fips_test_interim_info {\n \tchar *vec[MAX_LINE_PER_VECTOR];\n \tuint32_t nb_vec_lines;\n \tchar device_name[MAX_STRING_SIZE];\n+\tchar file_name[MAX_STRING_SIZE];\n \n \tunion {\n \t\tstruct aesavs_interim_data aes_data;\ndiff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c\nindex 15ee434e1..d7f4d58b0 100644\n--- a/examples/fips_validation/fips_validation_tdes.c\n+++ b/examples/fips_validation/fips_validation_tdes.c\n@@ -12,6 +12,7 @@\n \n #define NEW_LINE_STR\t\"#\"\n #define TEST_TYPE_KEY\t\" for CBC\"\n+#define TEST_TYPE_ECB_KEY\t\" for ECB\"\n #define TEST_CBCI_KEY\t\" for CBCI\"\n \n #define ENC_STR\t\t\"[ENCRYPT]\"\n@@ -250,6 +251,12 @@ parse_test_tdes_init(void)\n \t\t\tif (strstr(line, test_types[j].desc)) {\n \t\t\t\tinfo.interim_info.tdes_data.test_type =\n \t\t\t\t\t\ttest_types[j].type;\n+\t\t\t\tif (strstr(line, TEST_TYPE_ECB_KEY))\n+\t\t\t\t\tinfo.interim_info.tdes_data.test_mode =\n+\t\t\t\t\t\tTDES_MODE_ECB;\n+\t\t\t\telse\n+\t\t\t\t\tinfo.interim_info.tdes_data.test_mode =\n+\t\t\t\t\t\tTDES_MODE_CBC;\n \t\t\t\tbreak;\n \t\t\t}\n \t}\ndiff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c\nindex 813534068..7a379bc99 100644\n--- a/examples/fips_validation/main.c\n+++ b/examples/fips_validation/main.c\n@@ -689,16 +689,24 @@ prepare_tdes_xform(struct rte_crypto_sym_xform *xform)\n \n \txform->type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n \n-\tcipher_xform->algo = RTE_CRYPTO_CIPHER_3DES_CBC;\n+\tif (info.interim_info.tdes_data.test_mode == TDES_MODE_CBC)\n+\t\tcipher_xform->algo = RTE_CRYPTO_CIPHER_3DES_CBC;\n+\telse\n+\t\tcipher_xform->algo = RTE_CRYPTO_CIPHER_3DES_ECB;\n \tcipher_xform->op = (info.op == FIPS_TEST_ENC_AUTH_GEN) ?\n \t\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT :\n \t\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT;\n \tcipher_xform->key.data = vec.cipher_auth.key.val;\n \tcipher_xform->key.length = vec.cipher_auth.key.len;\n-\tcipher_xform->iv.length = vec.iv.len;\n-\tcipher_xform->iv.offset = IV_OFF;\n \n-\tcap_idx.algo.cipher = RTE_CRYPTO_CIPHER_3DES_CBC;\n+\tif (cipher_xform->algo == RTE_CRYPTO_CIPHER_3DES_CBC) {\n+\t\tcipher_xform->iv.length = vec.iv.len;\n+\t\tcipher_xform->iv.offset = IV_OFF;\n+\t} else {\n+\t\tcipher_xform->iv.length = 0;\n+\t\tcipher_xform->iv.offset = 0;\n+\t}\n+\tcap_idx.algo.cipher = cipher_xform->algo;\n \tcap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n \n \tcap = rte_cryptodev_sym_capability_get(env.dev_id, &cap_idx);\n@@ -1387,6 +1395,17 @@ init_test_ops(void)\n \t\t\ttest_ops.test = fips_generic_test;\n \t\tbreak;\n \tdefault:\n+\t\tif (strstr(info.file_name, \"TECB\") ||\n+\t\t\t\tstrstr(info.file_name, \"TCBC\")) {\n+\t\t\tinfo.algo = FIPS_TEST_ALGO_TDES;\n+\t\t\ttest_ops.prepare_op = prepare_cipher_op;\n+\t\t\ttest_ops.prepare_xform\t= prepare_tdes_xform;\n+\t\t\tif (info.interim_info.tdes_data.test_type == TDES_MCT)\n+\t\t\t\ttest_ops.test = fips_mct_tdes_test;\n+\t\t\telse\n+\t\t\t\ttest_ops.test = fips_generic_test;\n+\t\t\tbreak;\n+\t\t}\n \t\treturn -1;\n \t}\n \n", "prefixes": [ "v2", "1/3" ] }{ "id": 59456, "url": "