Show a patch.

GET /api/patches/43274/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 43274,
    "url": "http://patches.dpdk.org/api/patches/43274/?format=api",
    "web_url": "http://patches.dpdk.org/patch/43274/",
    "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"
    },
    "msgid": "<1532357165-8575-3-git-send-email-shally.verma@caviumnetworks.com>",
    "date": "2018-07-23T14:46:04",
    "name": "[v5,2/3] crypto/openssl: add dh and dsa asym op",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "30b1cfc8c42d9b419024d8e9ea101e1b7fd32010",
    "submitter": {
        "id": 960,
        "url": "http://patches.dpdk.org/api/people/960/?format=api",
        "name": "Shally Verma",
        "email": "shally.verma@caviumnetworks.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/?format=api",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43274/mbox/",
    "series": [
        {
            "id": 717,
            "url": "http://patches.dpdk.org/api/series/717/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=717",
            "date": "2018-07-23T14:46:02",
            "name": "crypto/openssl: support asymmetric crypto",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/717/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43274/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43274/checks/",
    "tags": {},
    "headers": {
        "X-Forefront-Antispam-Report": "SFV:NSPM;\n\tSFS:(10009020)(376002)(346002)(396003)(366004)(39860400002)(136003)(189003)(199004)(6486002)(42882007)(16586007)(478600001)(305945005)(446003)(50226002)(50466002)(5660300001)(11346002)(7736002)(476003)(48376002)(36756003)(44832011)(8676002)(486006)(2616005)(956004)(3846002)(14444005)(68736007)(54906003)(47776003)(72206003)(6116002)(97736004)(316002)(69596002)(107886003)(4326008)(2906002)(81166006)(66066001)(81156014)(2361001)(8936002)(25786009)(6512007)(53416004)(26005)(106356001)(6916009)(105586002)(55236004)(186003)(386003)(52116002)(6506007)(53936002)(6666003)(76176011)(51416003)(2351001)(16526019);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR0701MB3640;\n\tH:hyd1sverma-dt.caveonetworks.com; FPR:; SPF:None; LANG:en;\n\tPTR:InfoNoRecords; MX:1; A:1; ",
        "SpamDiagnosticOutput": "1:99",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=3iWtd1P8JJ/vyxm+gy3fxfnvNOzTYk8/PNqM5rkNK00=;\n\tb=n3gYNNju6qAHGYHvA+P3hZaz9pRqgbloCQwgNwDbuFGyWwKU/jGcxhftvwrgez27yOem1izKtCgH7J3Ur17JX2+NouJrnFGD6HbphftJiqD/dsnb3igqmlDHDISSEwzJkj3Z0fKiz9pcASBa9gCF0rkWNkiLNFeORXIJ37iB8OY=",
        "X-Mailman-Version": "2.1.15",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "23 Jul 2018 14:46:37.9027\n\t(UTC)",
        "X-MS-Office365-Filtering-Correlation-Id": "bc258282-c52b-41da-70be-08d5f0ab197c",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[115.113.156.2]",
        "X-MS-TrafficTypeDiagnostic": "DM5PR0701MB3640:",
        "X-Microsoft-Antispam": "BCL:0; PCL:0;\n\tRULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020);\n\tSRVR:DM5PR0701MB3640; ",
        "References": "<1532357165-8575-1-git-send-email-shally.verma@caviumnetworks.com>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Microsoft-Antispam-Message-Info": "KiPL11ka9UBYrr4wwjkfsSgJNPCmW5s0OEvCf5+CPSup8G5K4QPKBXRiG9oxjcjHFZDTigEPJzrbURmTP7htL9IIRvB0Dj7iZ/+rAu/tn39nva1jjgM/amOUU3inGDvqEPq7Vp/2Enuynhi7ugw1chdHv0oU7Gtte0p6PfB4bxVyQ8YfH/pdI4DS5pzaHZeeZtWRUEhnKniNMX2TjCpOAgQBQsb5tUagRLKlE8LaaLKJJD01XOdhUb6KKpspGtj2OiLAgBlBmUC2b297UClJ1UrhhnDYDSqHoFC3J8FbRVfeq2n4plWcS2PJJue+exvAOxJrv1VEM9sP1NM+kfjH1yg50tJsymTWGpjZ5+pIAa4=",
        "Date": "Mon, 23 Jul 2018 20:16:04 +0530",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Exchange-Antispam-Report-CFA-Test": "BCL:0; PCL:0;\n\tRULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);\n\tSRVR:DM5PR0701MB3640; BCL:0; PCL:0; RULEID:; SRVR:DM5PR0701MB3640; ",
        "Subject": "[dpdk-dev] [PATCH v5 2/3] crypto/openssl: add dh and dsa asym op",
        "In-Reply-To": "<1532357165-8575-1-git-send-email-shally.verma@caviumnetworks.com>",
        "MIME-Version": "1.0",
        "X-Microsoft-Antispam-PRVS": "<DM5PR0701MB36403E8929CD57C45F167C52F0560@DM5PR0701MB3640.namprd07.prod.outlook.com>",
        "X-BeenThere": "dev@dpdk.org",
        "Received-SPF": "None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "bc258282-c52b-41da-70be-08d5f0ab197c",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "Shally Verma <shally.verma@caviumnetworks.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-Microsoft-Exchange-Diagnostics": [
            "1; DM5PR0701MB3640;\n\t3:+Rq33FCql/FQereQlYbjBwrBoZf4k1dWDQ8rqrQupTR9slowdyi0dR6qydyDyMmu5WxOOBZYdLeSf9R4rb2DlnVVfda0x4THKryweLoyv6E/xU8YgZ00Zj48ZVwtDBwKyuAXRRciVL8vDpwlWWhpOQ5mWJwZ+bMWIU7ybgaPrY9kFwzh+eMdFV0riSNQ18GLtNaUQJ6qPrepDB0Zs18HvljF3B4BwbFKsqKPaGvw850htm+xj0AFaVlV3oPH5gE3;\n\t25:ozaeDGa5TmPrOnaaEuoHYmBk09yDgQxGqfWLjir8rRdBupoPzmA/KxdVRk6AtU9euCIrNkCsva8/CidTNb3UVxbER1tLEZ6+MEWoYdrUxsnyw54mHcV5maNNAT0XPYIl//6MXN+Wk2P/Go6Cb87Rv42cbAOf9BTADp8VWUC+IrvVhURV6cxkZWUHnnDuvOBj03p8AzyzNeemPV8/yNpcWsMvhaq0AlxCcXTQSkh/QyjX4sG1QRojhFXx5L1AjdKHOcc/mLxvp4vdpAzmLe+Rqj95L9lcVoCQhHh9KXPgMk+ytFagX66VL8V4Q+YUjcZvZqsMj1DU6w59H9/LofrTtg==;\n\t31:fepRjBoBuo/7NE9Mwu4wSWy3K0Eo2xPJeN4YPDJj+KTE7SOeWATIRljPxjF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L8fLsFAbIgp2IyP8sGteCSx/s0R1iHSxLG+kYj0EA3eNsg80Ykj+Sz21k6cEnqRViNyUoygQX/iAoxnMJi54bBekrZMy0KIeT/DgAGUjIGMzlBzAd5zYyMJWYbl/Cz5MoFW84WdAigL/iiGgeWErRmApCh1wXrnA75KenrkDuBxLHErEpEdc9CTwPDsyE/3rbBuAlD8AQKfXCtrzTKKsQdP17kZvmXo01i"
        ],
        "Delivered-To": "patchwork@dpdk.org",
        "Cc": "dev@dpdk.org, pathreya@caviumnetworks.com, nmurthy@caviumnetworks.com,\n\tSunila Sahu <sunila.sahu@caviumnetworks.com>,\n\tAshish Gupta <ashish.gupta@caviumnetworks.com>",
        "To": "pablo.de.lara.guarch@intel.com",
        "X-ClientProxiedBy": "MA1PR0101CA0020.INDPRD01.PROD.OUTLOOK.COM\n\t(2603:1096:a00:21::30) To DM5PR0701MB3640.namprd07.prod.outlook.com\n\t(2603:10b6:4:7e::12)",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "X-Mailer": "git-send-email 1.9.1",
        "SpamDiagnosticMetadata": "NSPM",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C2899325F;\n\tMon, 23 Jul 2018 16:46:43 +0200 (CEST)",
            "from NAM03-DM3-obe.outbound.protection.outlook.com\n\t(mail-dm3nam03on0051.outbound.protection.outlook.com [104.47.41.51])\n\tby dpdk.org (Postfix) with ESMTP id A52C83238\n\tfor <dev@dpdk.org>; Mon, 23 Jul 2018 16:46:42 +0200 (CEST)",
            "from hyd1sverma-dt.caveonetworks.com (115.113.156.2) by\n\tDM5PR0701MB3640.namprd07.prod.outlook.com (2603:10b6:4:7e::12) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n\t15.20.973.20; Mon, 23 Jul 2018 14:46:37 +0000"
        ],
        "X-MS-Exchange-CrossTenant-Id": "711e4ccf-2e9b-4bcf-a551-4094005b6194",
        "X-Forefront-PRVS": "0742443479",
        "X-Original-To": "patchwork@dpdk.org",
        "X-MS-PublicTrafficType": "Email",
        "X-OriginatorOrg": "caviumnetworks.com",
        "Message-Id": "<1532357165-8575-3-git-send-email-shally.verma@caviumnetworks.com>",
        "Precedence": "list",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "Authentication-Results": "spf=none (sender IP is )\n\tsmtp.mailfrom=Shally.Verma@cavium.com; ",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM5PR0701MB3640",
        "X-Exchange-Antispam-Report-Test": "UriScan:;"
    },
    "content": "From: Sunila Sahu <sunila.sahu@caviumnetworks.com>\n\n- Add dh key generation and shared compute\n- Add dsa sign and verify operation\n\nSigned-off-by: Sunila Sahu <sunila.sahu@caviumnetworks.com>\nSigned-off-by: Shally Verma <shally.verma@caviumnetworks.com>\nSigned-off-by: Ashish Gupta <ashish.gupta@caviumnetworks.com>\n---\n drivers/crypto/openssl/compat.h                  |  68 +++++++\n drivers/crypto/openssl/rte_openssl_pmd.c         | 237 +++++++++++++++++++++++\n drivers/crypto/openssl/rte_openssl_pmd_ops.c     | 194 ++++++++++++++++++-\n drivers/crypto/openssl/rte_openssl_pmd_private.h |   9 +\n 4 files changed, 507 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/crypto/openssl/compat.h b/drivers/crypto/openssl/compat.h\nindex 8ece808..45f9a33 100644\n--- a/drivers/crypto/openssl/compat.h\n+++ b/drivers/crypto/openssl/compat.h\n@@ -23,6 +23,41 @@\n \t\trsa->n = n; rsa->e = e; rsa->d = d; ret = 0; \\\n \t} while (0)\n \n+#define set_dh_params(dh, p, g, ret) \\\n+\tdo { \\\n+\t\tdh->p = p; \\\n+\t\tdh->q = NULL; \\\n+\t\tdh->g = g; \\\n+\t\tret = 0; \\\n+\t} while (0)\n+\n+#define set_dh_priv_key(dh, priv_key, ret) \\\n+\tdo { dh->priv_key = priv_key; ret = 0; } while (0)\n+\n+#define set_dsa_params(dsa, p, q, g, ret) \\\n+\tdo { dsa->p = p; dsa->q = q; dsa->g = g; ret = 0; } while (0)\n+\n+#define get_dh_pub_key(dh, pub_key) \\\n+\t(pub_key = dh->pub_key)\n+\n+#define get_dh_priv_key(dh, priv_key) \\\n+\t(priv_key = dh->priv_key)\n+\n+#define set_dsa_sign(sign, r, s) \\\n+\tdo { sign->r = r; sign->s = s; } while (0)\n+\n+#define get_dsa_sign(sign, r, s) \\\n+\tdo { r = sign->r; s = sign->s; } while (0)\n+\n+#define set_dsa_keys(dsa, pub, priv, ret) \\\n+\tdo { dsa->pub_key = pub; dsa->priv_key = priv; ret = 0; } while (0)\n+\n+#define set_dsa_pub_key(dsa, pub_key) \\\n+\t(dsa->pub_key = pub_key)\n+\n+#define get_dsa_priv_key(dsa, priv_key) \\\n+\t(priv_key = dsa->priv_key)\n+\n #else\n \n #define set_rsa_params(rsa, p, q, ret) \\\n@@ -35,6 +70,39 @@\n #define set_rsa_keys(rsa, n, e, d, ret) \\\n \t(ret = !RSA_set0_key(rsa, n, e, d))\n \n+#define set_dh_params(dh, p, g, ret) \\\n+\t(ret = !DH_set0_pqg(dh, p, NULL, g))\n+\n+#define set_dh_priv_key(dh, priv_key, ret) \\\n+\t(ret = !DH_set0_key(dh, NULL, priv_key))\n+\n+#define get_dh_pub_key(dh, pub_key) \\\n+\t(DH_get0_key(dh_key, &pub_key, NULL))\n+\n+#define get_dh_priv_key(dh, priv_key) \\\n+\t(DH_get0_key(dh_key, NULL, &priv_key))\n+\n+#define set_dsa_params(dsa, p, q, g, ret) \\\n+\t(ret = !DSA_set0_pqg(dsa, p, q, g))\n+\n+#define set_dsa_priv_key(dsa, priv_key) \\\n+\t(DSA_set0_key(dsa, NULL, priv_key))\n+\n+#define set_dsa_sign(sign, r, s) \\\n+\t(DSA_SIG_set0(sign, r, s))\n+\n+#define get_dsa_sign(sign, r, s) \\\n+\t(DSA_SIG_get0(sign, &r, &s))\n+\n+#define set_dsa_keys(dsa, pub, priv, ret) \\\n+\t(ret = !DSA_set0_key(dsa, pub, priv))\n+\n+#define set_dsa_pub_key(dsa, pub_key) \\\n+\t(DSA_set0_key(dsa, pub_key, NULL))\n+\n+#define get_dsa_priv_key(dsa, priv_key) \\\n+\t(DSA_get0_key(dsa, NULL, &priv_key))\n+\n #endif /* version < 10100000 */\n \n #endif /* __RTA_COMPAT_H__ */\ndiff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c\nindex 9d18e67..dd095a8 100644\n--- a/drivers/crypto/openssl/rte_openssl_pmd.c\n+++ b/drivers/crypto/openssl/rte_openssl_pmd.c\n@@ -1546,6 +1546,230 @@ process_openssl_auth_op(struct openssl_qp *qp, struct rte_crypto_op *op,\n \t\top->status = RTE_CRYPTO_OP_STATUS_ERROR;\n }\n \n+/* process dsa sign operation */\n+static int\n+process_openssl_dsa_sign_op(struct rte_crypto_op *cop,\n+\t\tstruct openssl_asym_session *sess)\n+{\n+\tstruct rte_crypto_dsa_op_param *op = &cop->asym->dsa;\n+\tDSA *dsa = sess->u.s.dsa;\n+\tDSA_SIG *sign = NULL;\n+\n+\tsign = DSA_do_sign(op->message.data,\n+\t\t\top->message.length,\n+\t\t\tdsa);\n+\n+\tif (sign == NULL) {\n+\t\tOPENSSL_LOG(ERR, \"%s:%d\\n\", __func__, __LINE__);\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\t} else {\n+\t\tconst BIGNUM *r = NULL, *s = NULL;\n+\t\tget_dsa_sign(sign, r, s);\n+\n+\t\top->r.length = BN_bn2bin(r, op->r.data);\n+\t\top->s.length = BN_bn2bin(s, op->s.data);\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n+\t}\n+\n+\tDSA_SIG_free(sign);\n+\n+\treturn 0;\n+}\n+\n+/* process dsa verify operation */\n+static int\n+process_openssl_dsa_verify_op(struct rte_crypto_op *cop,\n+\t\tstruct openssl_asym_session *sess)\n+{\n+\tstruct rte_crypto_dsa_op_param *op = &cop->asym->dsa;\n+\tDSA *dsa = sess->u.s.dsa;\n+\tint ret;\n+\tDSA_SIG *sign = DSA_SIG_new();\n+\tBIGNUM *r = NULL, *s = NULL;\n+\tBIGNUM *pub_key = NULL;\n+\n+\tif (sign == NULL) {\n+\t\tOPENSSL_LOG(ERR, \" %s:%d\\n\", __func__, __LINE__);\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;\n+\t\treturn -1;\n+\t}\n+\n+\tr = BN_bin2bn(op->r.data,\n+\t\t\top->r.length,\n+\t\t\tr);\n+\ts = BN_bin2bn(op->s.data,\n+\t\t\top->s.length,\n+\t\t\ts);\n+\tpub_key = BN_bin2bn(op->y.data,\n+\t\t\top->y.length,\n+\t\t\tpub_key);\n+\tif (!r || !s || !pub_key) {\n+\t\tif (r)\n+\t\t\tBN_free(r);\n+\t\tif (s)\n+\t\t\tBN_free(s);\n+\t\tif (pub_key)\n+\t\t\tBN_free(pub_key);\n+\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;\n+\t\treturn -1;\n+\t}\n+\tset_dsa_sign(sign, r, s);\n+\tset_dsa_pub_key(dsa, pub_key);\n+\n+\tret = DSA_do_verify(op->message.data,\n+\t\t\top->message.length,\n+\t\t\tsign,\n+\t\t\tdsa);\n+\n+\tif (ret != 1)\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\telse\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n+\n+\tDSA_SIG_free(sign);\n+\n+\treturn 0;\n+}\n+\n+/* process dh operation */\n+static int\n+process_openssl_dh_op(struct rte_crypto_op *cop,\n+\t\tstruct openssl_asym_session *sess)\n+{\n+\tstruct rte_crypto_dh_op_param *op = &cop->asym->dh;\n+\tDH *dh_key = sess->u.dh.dh_key;\n+\tBIGNUM *priv_key = NULL;\n+\tint ret = 0;\n+\n+\tif (sess->u.dh.key_op &\n+\t\t\t(1 << RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE)) {\n+\t\t/* compute shared secret using peer public key\n+\t\t * and current private key\n+\t\t * shared secret = peer_key ^ priv_key mod p\n+\t\t */\n+\t\tBIGNUM *peer_key = NULL;\n+\n+\t\t/* copy private key and peer key and compute shared secret */\n+\t\tpeer_key = BN_bin2bn(op->pub_key.data,\n+\t\t\t\top->pub_key.length,\n+\t\t\t\tpeer_key);\n+\t\tif (peer_key == NULL) {\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;\n+\t\t\treturn -1;\n+\t\t}\n+\t\tpriv_key = BN_bin2bn(op->priv_key.data,\n+\t\t\t\top->priv_key.length,\n+\t\t\t\tpriv_key);\n+\t\tif (priv_key == NULL) {\n+\t\t\tBN_free(peer_key);\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;\n+\t\t\treturn -1;\n+\t\t}\n+\t\tset_dh_priv_key(dh_key, priv_key, ret);\n+\t\tif (ret) {\n+\t\t\tOPENSSL_LOG(ERR, \"Failed to set private key\\n\");\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\t\t\tBN_free(peer_key);\n+\t\t\tBN_free(priv_key);\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t\tret = DH_compute_key(\n+\t\t\t\top->shared_secret.data,\n+\t\t\t\tpeer_key, dh_key);\n+\t\tif (ret < 0) {\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\t\t\tBN_free(peer_key);\n+\t\t\t/* priv key is already loaded into dh,\n+\t\t\t * let's not free that directly here.\n+\t\t\t * DH_free() will auto free it later.\n+\t\t\t */\n+\t\t\treturn 0;\n+\t\t}\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n+\t\top->shared_secret.length = ret;\n+\t\tBN_free(peer_key);\n+\t\treturn 0;\n+\t}\n+\n+\t/*\n+\t * other options are public and private key generations.\n+\t *\n+\t * if user provides private key,\n+\t * then first set DH with user provided private key\n+\t */\n+\tif ((sess->u.dh.key_op &\n+\t\t\t(1 << RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE)) &&\n+\t\t\t!(sess->u.dh.key_op &\n+\t\t\t(1 << RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE))) {\n+\t\t/* generate public key using user-provided private key\n+\t\t * pub_key = g ^ priv_key mod p\n+\t\t */\n+\n+\t\t/* load private key into DH */\n+\t\tpriv_key = BN_bin2bn(op->priv_key.data,\n+\t\t\t\top->priv_key.length,\n+\t\t\t\tpriv_key);\n+\t\tif (priv_key == NULL) {\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;\n+\t\t\treturn -1;\n+\t\t}\n+\t\tset_dh_priv_key(dh_key, priv_key, ret);\n+\t\tif (ret) {\n+\t\t\tOPENSSL_LOG(ERR, \"Failed to set private key\\n\");\n+\t\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\t\t\tBN_free(priv_key);\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\n+\t/* generate public and private key pair.\n+\t *\n+\t * if private key already set, generates only public key.\n+\t *\n+\t * if private key is not already set, then set it to random value\n+\t * and update internal private key.\n+\t */\n+\tif (!DH_generate_key(dh_key)) {\n+\t\tcop->status = RTE_CRYPTO_OP_STATUS_ERROR;\n+\t\treturn 0;\n+\t}\n+\n+\tif (sess->u.dh.key_op & (1 << RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE)) {\n+\t\tconst BIGNUM *pub_key = NULL;\n+\n+\t\tOPENSSL_LOG(DEBUG, \"%s:%d update public key\\n\",\n+\t\t\t\t__func__, __LINE__);\n+\n+\t\t/* get the generated keys */\n+\t\tget_dh_pub_key(dh_key, pub_key);\n+\n+\t\t/* output public key */\n+\t\top->pub_key.length = BN_bn2bin(pub_key,\n+\t\t\t\top->pub_key.data);\n+\t}\n+\n+\tif (sess->u.dh.key_op &\n+\t\t\t(1 << RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE)) {\n+\t\tconst BIGNUM *priv_key = NULL;\n+\n+\t\tOPENSSL_LOG(DEBUG, \"%s:%d updated priv key\\n\",\n+\t\t\t\t__func__, __LINE__);\n+\n+\t\t/* get the generated keys */\n+\t\tget_dh_priv_key(dh_key, priv_key);\n+\n+\t\t/* provide generated private key back to user */\n+\t\top->priv_key.length = BN_bn2bin(priv_key,\n+\t\t\t\top->priv_key.data);\n+\t}\n+\n+\tcop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;\n+\n+\treturn 0;\n+}\n+\n /* process modinv operation */\n static int process_openssl_modinv_op(struct rte_crypto_op *cop,\n \t\tstruct openssl_asym_session *sess)\n@@ -1718,6 +1942,19 @@ process_asym_op(struct openssl_qp *qp, struct rte_crypto_op *op,\n \tcase RTE_CRYPTO_ASYM_XFORM_MODINV:\n \t\tretval = process_openssl_modinv_op(op, sess);\n \t\tbreak;\n+\tcase RTE_CRYPTO_ASYM_XFORM_DH:\n+\t\tretval = process_openssl_dh_op(op, sess);\n+\t\tbreak;\n+\tcase RTE_CRYPTO_ASYM_XFORM_DSA:\n+\t\tif (op->asym->dsa.op_type == RTE_CRYPTO_ASYM_OP_SIGN)\n+\t\t\tretval = process_openssl_dsa_sign_op(op, sess);\n+\t\telse if (op->asym->dsa.op_type ==\n+\t\t\t\tRTE_CRYPTO_ASYM_OP_VERIFY)\n+\t\t\tretval =\n+\t\t\t\tprocess_openssl_dsa_verify_op(op, sess);\n+\t\telse\n+\t\t\top->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;\n+\t\tbreak;\n \tdefault:\n \t\top->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;\n \t\tbreak;\ndiff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c\nindex bbc203e..de22843 100644\n--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c\n+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c\n@@ -527,6 +527,48 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {\n \t\t},\n \t\t}\n \t},\n+\t{\t/* dh */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,\n+\t\t{.asym = {\n+\t\t\t.xform_capa = {\n+\t\t\t\t.xform_type = RTE_CRYPTO_ASYM_XFORM_DH,\n+\t\t\t\t.op_types =\n+\t\t\t\t((1<<RTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE) |\n+\t\t\t\t(1 << RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE |\n+\t\t\t\t(1 <<\n+\t\t\t\tRTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE))),\n+\t\t\t\t{\n+\t\t\t\t.modlen = {\n+\t\t\t\t/* value 0 symbolizes no limit on min length */\n+\t\t\t\t.min = 0,\n+\t\t\t\t/* value 0 symbolizes no limit on max length */\n+\t\t\t\t.max = 0,\n+\t\t\t\t.increment = 1\n+\t\t\t\t}, }\n+\t\t\t}\n+\t\t},\n+\t\t}\n+\t},\n+\t{\t/* dsa */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_ASYMMETRIC,\n+\t\t{.asym = {\n+\t\t\t.xform_capa = {\n+\t\t\t\t.xform_type = RTE_CRYPTO_ASYM_XFORM_DSA,\n+\t\t\t\t.op_types =\n+\t\t\t\t((1<<RTE_CRYPTO_ASYM_OP_SIGN) |\n+\t\t\t\t(1 << RTE_CRYPTO_ASYM_OP_VERIFY)),\n+\t\t\t\t{\n+\t\t\t\t.modlen = {\n+\t\t\t\t/* value 0 symbolizes no limit on min length */\n+\t\t\t\t.min = 0,\n+\t\t\t\t/* value 0 symbolizes no limit on max length */\n+\t\t\t\t.max = 0,\n+\t\t\t\t.increment = 1\n+\t\t\t\t}, }\n+\t\t\t}\n+\t\t},\n+\t\t}\n+\t},\n \n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n@@ -769,7 +811,8 @@ static int openssl_set_asym_session_parameters(\n {\n \tint ret = 0;\n \n-\tif (xform->next != NULL) {\n+\tif ((xform->xform_type != RTE_CRYPTO_ASYM_XFORM_DH) &&\n+\t\t(xform->next != NULL)) {\n \t\tOPENSSL_LOG(ERR, \"chained xfrms are not supported on %s\",\n \t\t\trte_crypto_asym_xform_strings[xform->xform_type]);\n \t\treturn -1;\n@@ -940,6 +983,147 @@ static int openssl_set_asym_session_parameters(\n \t\tasym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_MODINV;\n \t\tbreak;\n \t}\n+\tcase RTE_CRYPTO_ASYM_XFORM_DH:\n+\t{\n+\t\tBIGNUM *p = NULL;\n+\t\tBIGNUM *g = NULL;\n+\n+\t\tp = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dh.p.data,\n+\t\t\t\txform->dh.p.length,\n+\t\t\t\tp);\n+\t\tg = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dh.g.data,\n+\t\t\t\txform->dh.g.length,\n+\t\t\t\tg);\n+\t\tif (!p || !g)\n+\t\t\tgoto err_dh;\n+\n+\t\tDH *dh = DH_new();\n+\t\tif (dh == NULL) {\n+\t\t\tOPENSSL_LOG(ERR,\n+\t\t\t\t\"failed to allocate resources\\n\");\n+\t\t\tgoto err_dh;\n+\t\t}\n+\t\tset_dh_params(dh, p, g, ret);\n+\t\tif (ret) {\n+\t\t\tDH_free(dh);\n+\t\t\tgoto err_dh;\n+\t\t}\n+\n+\t\t/*\n+\t\t * setup xfrom for\n+\t\t * public key generate, or\n+\t\t * DH Priv key generate, or both\n+\t\t * public and private key generate\n+\t\t */\n+\t\tasym_session->u.dh.key_op = (1 << xform->dh.type);\n+\n+\t\tif (xform->dh.type ==\n+\t\t\tRTE_CRYPTO_ASYM_OP_PRIVATE_KEY_GENERATE) {\n+\t\t\t/* check if next is pubkey */\n+\t\t\tif ((xform->next != NULL) &&\n+\t\t\t\t(xform->next->xform_type ==\n+\t\t\t\tRTE_CRYPTO_ASYM_XFORM_DH) &&\n+\t\t\t\t(xform->next->dh.type ==\n+\t\t\t\tRTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE)\n+\t\t\t\t) {\n+\t\t\t\t/*\n+\t\t\t\t * setup op as pub/priv key\n+\t\t\t\t * pair generationi\n+\t\t\t\t */\n+\t\t\t\tasym_session->u.dh.key_op |=\n+\t\t\t\t(1 <<\n+\t\t\t\tRTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE);\n+\t\t\t}\n+\t\t}\n+\t\tasym_session->u.dh.dh_key = dh;\n+\t\tasym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_DH;\n+\t\tbreak;\n+\n+err_dh:\n+\t\tOPENSSL_LOG(ERR, \" failed to set dh params\\n\");\n+\t\tif (p)\n+\t\t\tBN_free(p);\n+\t\tif (g)\n+\t\t\tBN_free(g);\n+\t\treturn -1;\n+\t}\n+\tcase RTE_CRYPTO_ASYM_XFORM_DSA:\n+\t{\n+\t\tBIGNUM *p = NULL, *g = NULL;\n+\t\tBIGNUM *q = NULL, *priv_key = NULL;\n+\t\tBIGNUM *pub_key = BN_new();\n+\t\tBN_zero(pub_key);\n+\n+\t\tp = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dsa.p.data,\n+\t\t\t\txform->dsa.p.length,\n+\t\t\t\tp);\n+\n+\t\tg = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dsa.g.data,\n+\t\t\t\txform->dsa.g.length,\n+\t\t\t\tg);\n+\n+\t\tq = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dsa.q.data,\n+\t\t\t\txform->dsa.q.length,\n+\t\t\t\tq);\n+\t\tif (!p || !q || !g)\n+\t\t\tgoto err_dsa;\n+\n+\t\tpriv_key = BN_bin2bn((const unsigned char *)\n+\t\t\t\txform->dsa.x.data,\n+\t\t\t\txform->dsa.x.length,\n+\t\t\t\tpriv_key);\n+\t\tif (priv_key == NULL)\n+\t\t\tgoto err_dsa;\n+\n+\t\tDSA *dsa = DSA_new();\n+\t\tif (dsa == NULL) {\n+\t\t\tOPENSSL_LOG(ERR,\n+\t\t\t\t\" failed to allocate resources\\n\");\n+\t\t\tgoto err_dsa;\n+\t\t}\n+\n+\t\tset_dsa_params(dsa, p, q, g, ret);\n+\t\tif (ret) {\n+\t\t\tDSA_free(dsa);\n+\t\t\tOPENSSL_LOG(ERR, \"Failed to dsa params\\n\");\n+\t\t\tgoto err_dsa;\n+\t\t}\n+\n+\t\t/*\n+\t\t * openssl 1.1.0 mandate that public key can't be\n+\t\t * NULL in very first call. so set a dummy pub key.\n+\t\t * to keep consistency, lets follow same approach for\n+\t\t * both versions\n+\t\t */\n+\t\t/* just set dummy public for very 1st call */\n+\t\tset_dsa_keys(dsa, pub_key, priv_key, ret);\n+\t\tif (ret) {\n+\t\t\tDSA_free(dsa);\n+\t\t\tOPENSSL_LOG(ERR, \"Failed to set keys\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tasym_session->u.s.dsa = dsa;\n+\t\tasym_session->xfrm_type = RTE_CRYPTO_ASYM_XFORM_DSA;\n+\t\tbreak;\n+\n+err_dsa:\n+\t\tif (p)\n+\t\t\tBN_free(p);\n+\t\tif (q)\n+\t\t\tBN_free(q);\n+\t\tif (g)\n+\t\t\tBN_free(g);\n+\t\tif (priv_key)\n+\t\t\tBN_free(priv_key);\n+\t\tif (pub_key)\n+\t\t\tBN_free(pub_key);\n+\t\treturn -1;\n+\t}\n \tdefault:\n \t\treturn -1;\n \t}\n@@ -1021,6 +1205,14 @@ static void openssl_reset_asym_session(struct openssl_asym_session *sess)\n \t\t\tBN_CTX_free(sess->u.m.ctx);\n \t\t}\n \t\tbreak;\n+\tcase RTE_CRYPTO_ASYM_XFORM_DH:\n+\t\tif (sess->u.dh.dh_key)\n+\t\t\tDH_free(sess->u.dh.dh_key);\n+\t\tbreak;\n+\tcase RTE_CRYPTO_ASYM_XFORM_DSA:\n+\t\tif (sess->u.s.dsa)\n+\t\t\tDSA_free(sess->u.s.dsa);\n+\t\tbreak;\n \tdefault:\n \t\tbreak;\n \t}\ndiff --git a/drivers/crypto/openssl/rte_openssl_pmd_private.h b/drivers/crypto/openssl/rte_openssl_pmd_private.h\nindex 0ebe596..a8f2c84 100644\n--- a/drivers/crypto/openssl/rte_openssl_pmd_private.h\n+++ b/drivers/crypto/openssl/rte_openssl_pmd_private.h\n@@ -9,6 +9,8 @@\n #include <openssl/hmac.h>\n #include <openssl/des.h>\n #include <openssl/rsa.h>\n+#include <openssl/dh.h>\n+#include <openssl/dsa.h>\n \n #define CRYPTODEV_NAME_OPENSSL_PMD\tcrypto_openssl\n /**< Open SSL Crypto PMD device name */\n@@ -159,6 +161,13 @@ struct openssl_asym_session {\n \t\t\tBIGNUM *modulus;\n \t\t\tBN_CTX *ctx;\n \t\t} m;\n+\t\tstruct dh {\n+\t\t\tDH *dh_key;\n+\t\t\tuint32_t key_op;\n+\t\t} dh;\n+\t\tstruct {\n+\t\t\tDSA *dsa;\n+\t\t} s;\n \t} u;\n } __rte_cache_aligned;\n /** Set and validate OPENSSL crypto session parameters */\n",
    "prefixes": [
        "v5",
        "2/3"
    ]
}