From patchwork Thu Dec 5 15:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 63597 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AA2BA04F2; Thu, 5 Dec 2019 16:39:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3D5141BF8B; Thu, 5 Dec 2019 16:39:30 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1656E1BF88 for ; Thu, 5 Dec 2019 16:39:27 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB5Fa9qX028433; Thu, 5 Dec 2019 07:39:24 -0800 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=pfpt0818; bh=q5JkyArWjSwpmiXCxIT4jTioE3oIfoV2RzLMqj9IkpE=; b=kp6rnp6dq+HwkRL4R/YKnT2MKtVuImHKzoHI+ZyIcTfOwRo6mguBNkGVCDpkoXo8Sbmc N4t6WjsWIaC4G/JS0592VN0++dcOLkAwt8/m4R/6sc5z7AY4H+JhZaO2HJCIaBvyQ/OE LWwFt1qWyyHp4eW1U78xa5MmoPoErLo5gdNm5R3BNZAm4ZdbrLG7cpAEH3gQBe1m67LR 3PZv2SulUeeLeuWiqmJVe/2IbZiWmKHDnlP1XHLCribLwRQlYQ8uqlx+dMOfV89HARq4 ABlcIDJrg5noOUacZrMu0dHha3m6cAJ7mp2lvrHqi/ErzCfFrUxnKg+QLGoXyiw8f27W Ww== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2wpywp140b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 05 Dec 2019 07:39:24 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 5 Dec 2019 07:39:22 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 5 Dec 2019 07:39:23 -0800 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.60]) by maili.marvell.com (Postfix) with ESMTP id A3B403F7041; Thu, 5 Dec 2019 07:39:18 -0800 (PST) From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Pablo de Lara CC: Balakrishna Bhamidipati , Fiona Trahe , Arek Kusztal , "Jerin Jacob" , Narayana Prasad , "Shally Verma" , Ankur Dwivedi , "Sunila Sahu" , , Anoob Joseph Date: Thu, 5 Dec 2019 21:07:57 +0530 Message-ID: <1575560280-3261-2-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1575560280-3261-1-git-send-email-anoobj@marvell.com> References: <1575560280-3261-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-05_03:2019-12-04,2019-12-05 signatures=0 Subject: [dpdk-dev] [PATCH 1/4] lib/crypto: add support for EC Point Multiplication X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Balakrishna Bhamidipati Elliptic Curve Point Multiplication xform type and op parameters are added. Signed-off-by: Anoob Joseph Signed-off-by: Balakrishna Bhamidipati Signed-off-by: Sunila Sahu --- doc/guides/cryptodevs/features/default.ini | 1 + lib/librte_cryptodev/rte_crypto_asym.h | 17 +++++++++++++++++ lib/librte_cryptodev/rte_cryptodev.c | 1 + 3 files changed, 19 insertions(+) diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 2f6c785..3a54b07 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -109,3 +109,4 @@ Modular Exponentiation = Modular Inversion = Diffie-hellman = ECDSA = +EC Point Multiplication = diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h index dd5e6e3..b98ce6c 100644 --- a/lib/librte_cryptodev/rte_crypto_asym.h +++ b/lib/librte_cryptodev/rte_crypto_asym.h @@ -85,6 +85,8 @@ enum rte_crypto_asym_xform_type { /**< Elliptic Curve Digital Signature Algorithm * Perform Signature Generation and Verification. */ + RTE_CRYPTO_ASYM_XFORM_EC_POINT_MUL, + /**< Elliptic Curve Point Multiplication */ RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END /**< End of list */ }; @@ -598,6 +600,20 @@ struct rte_crypto_ecdsa_op_param { }; /** + * Structure for EC point operation param + */ +struct rte_crypto_ec_point_mul_param { + struct rte_crypto_ec_point p; + /**< x and y coordinates of input point */ + + struct rte_crypto_ec_point r; + /**< x and y coordinates of resultant point */ + + rte_crypto_param scalar; + /**< Scalar to multiply the input point */ +}; + +/** * Asymmetric Cryptographic Operation. * * Structure describing asymmetric crypto operation params. @@ -620,6 +636,7 @@ struct rte_crypto_asym_op { struct rte_crypto_dh_op_param dh; struct rte_crypto_dsa_op_param dsa; struct rte_crypto_ecdsa_op_param ecdsa; + struct rte_crypto_ec_point_mul_param ecpm; }; }; diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 0d6babb..eea57c6 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -174,6 +174,7 @@ const char *rte_crypto_asym_xform_strings[] = { [RTE_CRYPTO_ASYM_XFORM_DH] = "dh", [RTE_CRYPTO_ASYM_XFORM_DSA] = "dsa", [RTE_CRYPTO_ASYM_XFORM_ECDSA] = "ecdsa", + [RTE_CRYPTO_ASYM_XFORM_EC_POINT_MUL] = "ecpm", }; /**