Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/56633/?format=api
http://patches.dpdk.org/api/patches/56633/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190717125111.11288-11-arkadiuszx.kusztal@intel.com/", "project": { "id": 1, "url": "http://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": "<20190717125111.11288-11-arkadiuszx.kusztal@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190717125111.11288-11-arkadiuszx.kusztal@intel.com", "date": "2019-07-17T12:51:10", "name": "[v4,10/11] test: add pkcs1_5 padding simulation", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "fc47dba865f1f2cf52f0b6a9ad3b0c55c51e6f04", "submitter": { "id": 452, "url": "http://patches.dpdk.org/api/people/452/?format=api", "name": "Arkadiusz Kusztal", "email": "arkadiuszx.kusztal@intel.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190717125111.11288-11-arkadiuszx.kusztal@intel.com/mbox/", "series": [ { "id": 5565, "url": "http://patches.dpdk.org/api/series/5565/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5565", "date": "2019-07-17T12:51:00", "name": "Rework API for RSA algorithm in asymmetric crypto", "version": 4, "mbox": "http://patches.dpdk.org/series/5565/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/56633/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/56633/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 6882B1BE49;\n\tWed, 17 Jul 2019 14:55:17 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 867731BE3C\n\tfor <dev@dpdk.org>; Wed, 17 Jul 2019 14:55:12 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Jul 2019 05:55:12 -0700", "from akusztax-mobl.ger.corp.intel.com ([10.104.12.189])\n\tby fmsmga001.fm.intel.com with ESMTP; 17 Jul 2019 05:55:10 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,274,1559545200\"; d=\"scan'208\";a=\"187553092\"", "From": "Arek Kusztal <arkadiuszx.kusztal@intel.com>", "To": "dev@dpdk.org", "Cc": "akhil.goyal@nxp.com, fiona.trahe@intel.com, shallyv@marvell.com,\n\tdamianx.nowak@intel.com, Arek Kusztal <arkadiuszx.kusztal@intel.com>", "Date": "Wed, 17 Jul 2019 14:51:10 +0200", "Message-Id": "<20190717125111.11288-11-arkadiuszx.kusztal@intel.com>", "X-Mailer": "git-send-email 2.19.1.windows.1", "In-Reply-To": "<20190717125111.11288-1-arkadiuszx.kusztal@intel.com>", "References": "<20190717125111.11288-1-arkadiuszx.kusztal@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v4 10/11] test: add pkcs1_5 padding simulation", "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": "This patch adds function to simulate pkcs1_5 padding, it serves nothing\nelse than example. It provides no security and should not be used in\nsecurity context.\n\nSigned-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>\n---\n app/test/test_cryptodev_asym_util.h | 54 +++++++++++++++++++++++++++++++++++++\n 1 file changed, 54 insertions(+)", "diff": "diff --git a/app/test/test_cryptodev_asym_util.h b/app/test/test_cryptodev_asym_util.h\nindex b3d9fb4..f984166 100644\n--- a/app/test/test_cryptodev_asym_util.h\n+++ b/app/test/test_cryptodev_asym_util.h\n@@ -1,10 +1,64 @@\n /* SPDX-License-Identifier: BSD-3-Clause\n * Copyright(c) 2018 Cavium Networks\n+ * Copyright (c) 2019 Intel Corporation\n */\n \n #ifndef TEST_CRYPTODEV_ASYM_TEST_UTIL_H__\n #define TEST_CRYPTODEV_ASYM_TEST_UTIL_H__\n \n+/*\n+ * Two functions below simulate pkcs 1.5 padding and serves only as an example,\n+ * both offer no security.\n+ */\n+static inline int rsa_simulate_pkcs1_5_padding(int op, uint8_t *p,\n+\t\tint key_size, const uint8_t *src, int len) {\n+\n+\tint ps_len;\n+\n+\tif (len > key_size - 11)\n+\t\treturn -1;\n+\tps_len = key_size - len - 3;\n+\n+\t*(p++) = 0;\n+\t*(p++) = op ? 1 : 2;\n+\tif (op) {\n+\t\twhile (ps_len--)\n+\t\t\t*(p++) = 0xFF;\n+\t} else {\n+\t\twhile (ps_len--) {\n+\t\t\t*p = (uint8_t)rand();\n+\t\t\t*p ^= !(*p);\n+\t\t\tp++;\n+\t\t}\n+\t}\n+\n+\t*(p++) = 0;\n+\tmemcpy(p, src, len);\n+\n+\treturn 0;\n+}\n+\n+static inline int rsa_simulate_strip_pkcs1_5_padding(uint8_t *src,\n+\t\tint key_size) {\n+\tuint8_t tmp[key_size], *orig_src = src;\n+\tint i = 1;\n+\t++src;\n+\twhile (*(src) && i < key_size) {\n+\t\t++i;\n+\t\t++src;\n+\t}\n+\tif (i == key_size)\n+\t\treturn -1;\n+\n+\t++i;\n+\t++src;\n+\n+\tmemcpy(tmp, src, key_size - i);\n+\tmemcpy(orig_src, tmp, key_size - i);\n+\treturn key_size - i;\n+}\n+\n+\n /* Below Apis compare resulted buffer to original test vector */\n \n static inline int rsa_verify(struct rsa_test_data *rsa_param,\n", "prefixes": [ "v4", "10/11" ] }{ "id": 56633, "url": "