get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128393,
    "url": "http://patchwork.dpdk.org/api/patches/128393/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/4d81301d97ed539af3361efbf74659b9e3a12a84.1686213149.git.gmuthukrishn@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<4d81301d97ed539af3361efbf74659b9e3a12a84.1686213149.git.gmuthukrishn@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4d81301d97ed539af3361efbf74659b9e3a12a84.1686213149.git.gmuthukrishn@marvell.com",
    "date": "2023-06-08T08:36:02",
    "name": "[v4,1/3] cryptodev: add SM2 asymmetric crypto algorithm",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7b935ccfda6bfe72e567489b8947d7da8fbbacc5",
    "submitter": {
        "id": 2301,
        "url": "http://patchwork.dpdk.org/api/people/2301/?format=api",
        "name": "Gowrishankar Muthukrishnan",
        "email": "gmuthukrishn@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/4d81301d97ed539af3361efbf74659b9e3a12a84.1686213149.git.gmuthukrishn@marvell.com/mbox/",
    "series": [
        {
            "id": 28414,
            "url": "http://patchwork.dpdk.org/api/series/28414/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28414",
            "date": "2023-06-08T08:36:01",
            "name": "SM2 crypto algorithm support",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/28414/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128393/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/128393/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id BFAF242C5C;\n\tThu,  8 Jun 2023 10:36:18 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 85EAC410F2;\n\tThu,  8 Jun 2023 10:36:17 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 584C5410D7\n for <dev@dpdk.org>; Thu,  8 Jun 2023 10:36:16 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3588D21d023579; Thu, 8 Jun 2023 01:36:15 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r329c1xw3-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 08 Jun 2023 01:36:15 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 8 Jun 2023 01:36:13 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 8 Jun 2023 01:36:13 -0700",
            "from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.175.191])\n by maili.marvell.com (Postfix) with ESMTP id 259473F70B4;\n Thu,  8 Jun 2023 01:36:10 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=v4DIl4dE8EHZX5f1IkrADN4EcRvKnqfvYIPU1AOCt9g=;\n b=Kye4Yath6z5iLfr3mNkIc7dKXYiRCQbvaQvilWr2r6otSrLFXDj3xNRPxNDGHH/Y4+mU\n mUgUae5+D2NwGST74EW7gYXaD1e0XKl4SVbVeeYzmOVB1Ojo0E1DNU9O0T8TaBg2a6CE\n wJa4h9ikWOcdXgYrkruum+lKh6Jh6r8QBClepCWXTO8Ypk5UZqGL1SnMsfUI9dFDDIFp\n cbb4k85nUtcep5B36FYyTjTh3/2lBW2rBGz6LW07LxCmP4xl0jtOXFErWMhXrGFFzW7v\n IN6KbHs/JjLJAD/u88bOdh9qVXbe+CDF2mpsGcpEpytojGlBrrlZu9dvdKvjS3BaYCCh JA==",
        "From": "Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<anoobj@marvell.com>, Akhil Goyal <gakhil@marvell.com>, Arkadiusz Kusztal\n <arkadiuszx.kusztal@intel.com>, Fan Zhang <fanzhang.oss@gmail.com>, Kai Ji\n <kai.ji@intel.com>, Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>",
        "Subject": "[PATCH v4 1/3] cryptodev: add SM2 asymmetric crypto algorithm",
        "Date": "Thu, 8 Jun 2023 14:06:02 +0530",
        "Message-ID": "\n <4d81301d97ed539af3361efbf74659b9e3a12a84.1686213149.git.gmuthukrishn@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<cover.1686213149.git.gmuthukrishn@marvell.com>",
        "References": "<cover.1686213149.git.gmuthukrishn@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "bmkXetsv4oQsSTYgYr009DYjU-hPmPWA",
        "X-Proofpoint-ORIG-GUID": "bmkXetsv4oQsSTYgYr009DYjU-hPmPWA",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26\n definitions=2023-06-08_05,2023-06-07_01,2023-05-22_02",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "ShangMi 2 (SM2) is set of public-key cryptography algorithms\nbased on elliptic curves.\n\nAdded support for asymmetric SM2 in cryptodev along with prime\nfield curve, as referenced in RFC:\nhttps://datatracker.ietf.org/doc/html/draft-shen-sm2-ecdsa-02\n\nSigned-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>\n---\n doc/guides/cryptodevs/features/default.ini |  1 +\n doc/guides/rel_notes/release_23_07.rst     |  5 ++\n lib/cryptodev/rte_crypto_asym.h            | 87 ++++++++++++++++++++++\n lib/cryptodev/rte_cryptodev.c              |  1 +\n 4 files changed, 94 insertions(+)",
    "diff": "diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini\nindex 523da0cfa8..a69967bb9e 100644\n--- a/doc/guides/cryptodevs/features/default.ini\n+++ b/doc/guides/cryptodevs/features/default.ini\n@@ -125,6 +125,7 @@ Diffie-hellman          =\n ECDSA                   =\n ECPM                    =\n ECDH                    =\n+SM2                     =\n \n ;\n ; Supported Operating systems of a default crypto driver.\ndiff --git a/doc/guides/rel_notes/release_23_07.rst b/doc/guides/rel_notes/release_23_07.rst\nindex 0ecf993206..82e29bec5e 100644\n--- a/doc/guides/rel_notes/release_23_07.rst\n+++ b/doc/guides/rel_notes/release_23_07.rst\n@@ -67,6 +67,11 @@ New Features\n   to PCI bus so that PCI drivers can access PCI memory resources\n   when they are not mapped to process address space.\n \n+* **Added SM2 asymmetric algorithm in cryptodev.**\n+\n+  Added support for ShamMi 2 (SM2) asymmetric crypto algorithm\n+  along with prime field curve support.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h\nindex 989f38323f..2d20057b80 100644\n--- a/lib/cryptodev/rte_crypto_asym.h\n+++ b/lib/cryptodev/rte_crypto_asym.h\n@@ -119,6 +119,11 @@ enum rte_crypto_asym_xform_type {\n \t/**< Elliptic Curve Point Multiplication */\n \tRTE_CRYPTO_ASYM_XFORM_ECFPM,\n \t/**< Elliptic Curve Fixed Point Multiplication */\n+\tRTE_CRYPTO_ASYM_XFORM_SM2,\n+\t/**< ShangMi 2\n+\t * Performs Encrypt, Decrypt, Sign and Verify.\n+\t * Refer to rte_crypto_asym_op_type.\n+\t */\n \tRTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END\n \t/**< End of list */\n };\n@@ -382,6 +387,17 @@ struct rte_crypto_ec_xform {\n \t/**< Pre-defined ec groups */\n };\n \n+/**\n+ * Asymmetric SM2 transform data\n+ *\n+ * Structure describing SM2 xform params\n+ *\n+ */\n+struct rte_crypto_sm2_xform {\n+\tenum rte_crypto_auth_algorithm hash;\n+\t/**< Hash algorithm used in SM2 op. */\n+};\n+\n /**\n  * Operations params for modular operations:\n  * exponentiation and multiplicative inverse\n@@ -637,9 +653,79 @@ struct rte_crypto_asym_xform {\n \t\t/**< EC xform parameters, used by elliptic curve based\n \t\t * operations.\n \t\t */\n+\n+\t\tstruct rte_crypto_sm2_xform sm2;\n+\t\t/**< SM2 xform parameters */\n \t};\n };\n \n+/**\n+ * SM2 operation params\n+ */\n+struct rte_crypto_sm2_op_param {\n+\tenum rte_crypto_asym_op_type op_type;\n+\t/**< Signature generation or verification */\n+\n+\trte_crypto_uint pkey;\n+\t/**< Private key for encryption or sign generation */\n+\n+\tstruct rte_crypto_ec_point q;\n+\t/**< Public key for decryption or verification */\n+\n+\trte_crypto_param message;\n+\t/**<\n+\t * Pointer to input data\n+\t * - to be encrypted for SM2 public encrypt.\n+\t * - to be signed for SM2 sign generation.\n+\t * - to be authenticated for SM2 sign verification.\n+\t *\n+\t * Pointer to output data\n+\t * - for SM2 private decrypt.\n+\t * In this case the underlying array should have been\n+\t * allocated with enough memory to hold plaintext output\n+\t * (at least encrypted text length). The message.length field\n+\t * will be overwritten by the PMD with the decrypted length.\n+\t */\n+\n+\trte_crypto_param cipher;\n+\t/**<\n+\t * Pointer to input data\n+\t * - to be decrypted for SM2 private decrypt.\n+\t *\n+\t * Pointer to output data\n+\t * - for SM2 public encrypt.\n+\t * In this case the underlying array should have been allocated\n+\t * with enough memory to hold ciphertext output (at least X bytes\n+\t * for prime field curve of N bytes and for message M bytes,\n+\t * where X = (C1 || C2 || C3) and computed based on SM2 RFC as\n+\t * C1 (1 + N + N), C2 = M, C3 = N. The cipher.length field will\n+\t * be overwritten by the PMD with the encrypted length.\n+\t */\n+\n+\trte_crypto_uint id;\n+\t/**< The SM2 id used by signer and verifier. */\n+\n+\trte_crypto_uint k;\n+\t/**< The SM2 per-message secret number, which is an integer\n+\t * in the interval (1, n-1).\n+\t * If the random number is generated by the PMD,\n+\t * the 'rte_crypto_param.data' parameter should be set to NULL.\n+\t */\n+\n+\trte_crypto_uint r;\n+\t/**< r component of elliptic curve signature\n+\t *     output : for signature generation (of at least N bytes\n+\t *              where prime field length is N bytes)\n+\t *     input  : for signature verification\n+\t */\n+\trte_crypto_uint s;\n+\t/**< s component of elliptic curve signature\n+\t *     output : for signature generation (of at least N bytes\n+\t *              where prime field length is N bytes)\n+\t *     input  : for signature verification\n+\t */\n+};\n+\n /**\n  * Asymmetric Cryptographic Operation.\n  *\n@@ -665,6 +751,7 @@ struct rte_crypto_asym_op {\n \t\tstruct rte_crypto_dsa_op_param dsa;\n \t\tstruct rte_crypto_ecdsa_op_param ecdsa;\n \t\tstruct rte_crypto_ecpm_op_param ecpm;\n+\t\tstruct rte_crypto_sm2_op_param sm2;\n \t};\n \tuint16_t flags;\n \t/**<\ndiff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c\nindex a96114b2da..21cabc3ffd 100644\n--- a/lib/cryptodev/rte_cryptodev.c\n+++ b/lib/cryptodev/rte_cryptodev.c\n@@ -299,6 +299,7 @@ crypto_asym_xform_strings[] = {\n \t[RTE_CRYPTO_ASYM_XFORM_DSA]\t= \"dsa\",\n \t[RTE_CRYPTO_ASYM_XFORM_ECDSA]\t= \"ecdsa\",\n \t[RTE_CRYPTO_ASYM_XFORM_ECPM]\t= \"ecpm\",\n+\t[RTE_CRYPTO_ASYM_XFORM_SM2]\t= \"sm2\",\n };\n \n /**\n",
    "prefixes": [
        "v4",
        "1/3"
    ]
}