From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ayuj Verma Subject: [PATCH v3 1/4] lib/cryptodev: add rsa priv key feature flag Date: Thu, 28 Mar 2019 10:28:22 +0000 Message-ID: <1553768834-19072-2-git-send-email-ayverma@marvell.com> References: <1553768834-19072-1-git-send-email-ayverma@marvell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "arkadiuszx.kusztal@intel.com" , "Shally Verma" , Sunila Sahu , "Kanaka Durga Kotamarthy" , Arvind Desai , "dev@dpdk.org" , Ayuj Verma To: "akhil.goyal@nxp.com" Return-path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 57C434C88 for ; Thu, 28 Mar 2019 11:28:37 +0100 (CET) In-Reply-To: <1553768834-19072-1-git-send-email-ayverma@marvell.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add feature flag to reflect RSA private key operation support using quintuple (crt) or exponent type key. if PMD support both, then it should set both. App should query cryptodev feature flag to check if Sign and Decryt with CRT keys or exponent is supported, thus call operation with relevant key type. Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- lib/librte_cryptodev/rte_cryptodev.c | 4 ++++ lib/librte_cryptodev/rte_cryptodev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rt= e_cryptodev.c index 871d7dd..cdc586a 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -486,6 +486,10 @@ struct rte_cryptodev_sym_session_pool_private_data { return "CPU_ARM_CE"; case RTE_CRYPTODEV_FF_SECURITY: return "SECURITY_PROTOCOL"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP: + return "RSA_PRIV_OP_KEY_EXP"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT: + return "RSA_PRIV_OP_KEY_QT"; default: return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rt= e_cryptodev.h index a0bbcf9..298b352 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -438,6 +438,10 @@ struct rte_cryptodev_asym_capability_idx { /**< Utilises ARM CPU Cryptographic Extensions */ #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16) /**< Support Security Protocol Processing */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17) +/**< Support RSA Private Key OP with exponent */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18) +/**< Support RSA Private Key OP with CRT (quintuple) Keys */ =20 =20 /** --=20 1.8.3.1