DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
@ 2019-02-27 13:33 Ayuj Verma
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Ayuj Verma @ 2019-02-27 13:33 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev, Ayuj Verma

Some PMDs can only support RSA private key operations using CRT
(quintuple) or exponent key only. Thus it is required to add
feature flag (ff) in PMD to reflect which key type is supported
to perform sign and decrypt ops.

Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
to perform a private key op using CRT keys (quintuple) or
exponent or both.

App should query PMD feature flag to check if specific
key type is supported and call operation with relevant key type.

Ayuj Verma (3):
  lib/cryptodev: add rsa priv key feature flag
  crypto/openssl: set rsa private op feature flag
  test/crypto: check for rsa key type feature flag

 drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
 lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
 lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
 test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

-- 
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag
  2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
@ 2019-02-27 13:33 ` Ayuj Verma
  2019-03-17 17:46   ` Akhil Goyal
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 2/3] crypto/openssl: set rsa private op " Ayuj Verma
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 15+ messages in thread
From: Ayuj Verma @ 2019-02-27 13:33 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev, Ayuj Verma

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 <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
 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/rte_cryptodev.c
index 700973530..bb90ac939 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		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/rte_cryptodev.h
index a0bbcf932..298b35217 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
 /**< 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 */
 
 
 /**
-- 
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 2/3] crypto/openssl: set rsa private op feature flag
  2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
@ 2019-02-27 13:33 ` Ayuj Verma
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type " Ayuj Verma
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Ayuj Verma @ 2019-02-27 13:33 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev, Ayuj Verma

openssl PMD support RSA private key operation
using both qt and exp key type.
Set both feature flag in PMD capability

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index ea5aac69e..3a8719990 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2119,7 +2119,9 @@ cryptodev_openssl_create(const char *name,
 			RTE_CRYPTODEV_FF_CPU_AESNI |
 			RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
 			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
-			RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO;
+			RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
+			RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP |
+			RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
 
 	/* Set vector instructions mode supported */
 	internals = dev->data->dev_private;
-- 
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type feature flag
  2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 2/3] crypto/openssl: set rsa private op " Ayuj Verma
@ 2019-02-27 13:33 ` Ayuj Verma
  2019-03-17 17:49   ` Akhil Goyal
  2019-03-05  9:11 ` [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
  2019-03-13 19:06 ` Kusztal, ArkadiuszX
  4 siblings, 1 reply; 15+ messages in thread
From: Ayuj Verma @ 2019-02-27 13:33 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev, Ayuj Verma

Check for RSA private key type feature flag in
private key operations

Signed-off-by: Ayuj Verma <ayverma@marvell.com>
Signed-off-by: Shally Verma <shallyv@marvell.com>
---
 test/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/test/test/test_cryptodev_asym.c b/test/test/test_cryptodev_asym.c
index 0f6fc5767..950a7bd00 100644
--- a/test/test/test_cryptodev_asym.c
+++ b/test/test/test_cryptodev_asym.c
@@ -49,6 +49,7 @@ test_rsa_sign_verify(void)
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
+	struct rte_cryptodev_info dev_info;
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
 	struct rte_cryptodev_asym_session *sess = NULL;
@@ -56,6 +57,18 @@ test_rsa_sign_verify(void)
 	uint8_t output_buf[TEST_DATA_SIZE] = {0};
 	uint8_t input_buf[TEST_DATA_SIZE] = {0};
 
+	/* test case supports op with exponent keyonly,
+	 * so check for it in feature_flags
+	 */
+	rte_cryptodev_info_get(dev_id, &dev_info);
+	if (!(dev_info.feature_flags &
+				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
+		RTE_LOG(INFO, USER1,
+				"Device doesn't support sign op with "
+				"exponent key type. Test Skipped\n");
+		return TEST_SKIPPED;
+	}
+
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
 
 	if (!sess) {
@@ -183,12 +196,25 @@ test_rsa_enc_dec(void)
 	struct rte_mempool *op_mpool = ts_params->op_mpool;
 	struct rte_mempool *sess_mpool = ts_params->session_mpool;
 	uint8_t dev_id = ts_params->valid_devs[0];
+	struct rte_cryptodev_info dev_info;
 	struct rte_crypto_asym_op *asym_op = NULL;
 	struct rte_crypto_op *op = NULL, *result_op = NULL;
 	struct rte_cryptodev_asym_session *sess = NULL;
 	int status = TEST_SUCCESS;
 	uint8_t input_buf[TEST_DATA_SIZE] = {0};
 
+	/* test case supports op with exponent keyonly,
+	 * so check for it in feature_flags
+	 */
+	rte_cryptodev_info_get(dev_id, &dev_info);
+	if (!(dev_info.feature_flags &
+				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
+		RTE_LOG(INFO, USER1,
+				"Device doesn't support sign op with "
+				"exponent key type. Test Skipped\n");
+		return TEST_SKIPPED;
+	}
+
 	sess = rte_cryptodev_asym_session_create(sess_mpool);
 
 	if (!sess) {
-- 
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
  2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
                   ` (2 preceding siblings ...)
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type " Ayuj Verma
@ 2019-03-05  9:11 ` Ayuj Verma
  2019-03-13  7:29   ` Ayuj Verma
  2019-03-13 19:06 ` Kusztal, ArkadiuszX
  4 siblings, 1 reply; 15+ messages in thread
From: Ayuj Verma @ 2019-03-05  9:11 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Akhil,


Did you get a chance to look into these.


Thanks and regards

Ayuj Verma

________________________________
From: Ayuj Verma
Sent: 27 February 2019 19:03:31
To: akhil.goyal@nxp.com
Cc: arkadiuszx.kusztal@intel.com; fiona.trahe@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org; Ayuj Verma
Subject: [PATCH v2 0/3] adding rsa priv key feature flag

Some PMDs can only support RSA private key operations using CRT
(quintuple) or exponent key only. Thus it is required to add
feature flag (ff) in PMD to reflect which key type is supported
to perform sign and decrypt ops.

Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
to perform a private key op using CRT keys (quintuple) or
exponent or both.

App should query PMD feature flag to check if specific
key type is supported and call operation with relevant key type.

Ayuj Verma (3):
  lib/cryptodev: add rsa priv key feature flag
  crypto/openssl: set rsa private op feature flag
  test/crypto: check for rsa key type feature flag

 drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
 lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
 lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
 test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

--
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
  2019-03-05  9:11 ` [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
@ 2019-03-13  7:29   ` Ayuj Verma
  2019-03-13 19:02     ` Kusztal, ArkadiuszX
  0 siblings, 1 reply; 15+ messages in thread
From: Ayuj Verma @ 2019-03-13  7:29 UTC (permalink / raw)
  To: akhil.goyal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Akhil, Fiona, Arek,


Gentle reminder.


Did you get a chance to look into these.


Thanks and regards

Ayuj Verma

________________________________
From: dev <dev-bounces@dpdk.org> on behalf of Ayuj Verma <ayverma@marvell.com>
Sent: 05 March 2019 14:41:18
To: akhil.goyal@nxp.com
Cc: arkadiuszx.kusztal@intel.com; fiona.trahe@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org
Subject: [EXT] Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag

External Email

----------------------------------------------------------------------
Hi Akhil,


Did you get a chance to look into these.


Thanks and regards

Ayuj Verma

________________________________
From: Ayuj Verma
Sent: 27 February 2019 19:03:31
To: akhil.goyal@nxp.com
Cc: arkadiuszx.kusztal@intel.com; fiona.trahe@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org; Ayuj Verma
Subject: [PATCH v2 0/3] adding rsa priv key feature flag

Some PMDs can only support RSA private key operations using CRT
(quintuple) or exponent key only. Thus it is required to add
feature flag (ff) in PMD to reflect which key type is supported
to perform sign and decrypt ops.

Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
to perform a private key op using CRT keys (quintuple) or
exponent or both.

App should query PMD feature flag to check if specific
key type is supported and call operation with relevant key type.

Ayuj Verma (3):
  lib/cryptodev: add rsa priv key feature flag
  crypto/openssl: set rsa private op feature flag
  test/crypto: check for rsa key type feature flag

 drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
 lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
 lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
 test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

--
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
  2019-03-13  7:29   ` Ayuj Verma
@ 2019-03-13 19:02     ` Kusztal, ArkadiuszX
  0 siblings, 0 replies; 15+ messages in thread
From: Kusztal, ArkadiuszX @ 2019-03-13 19:02 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal
  Cc: Trahe, Fiona, Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy,
	Arvind Desai, dev

Hi Ayuj,

Sorry for delayed answer.

For me it is perfectly fine, I will ack it.

Thanks,
Arek

From: Ayuj Verma [mailto:ayverma@marvell.com]
Sent: Wednesday, March 13, 2019 8:30 AM
To: akhil.goyal@nxp.com
Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; Shally Verma <shallyv@marvell.com>; Sunila Sahu <ssahu@marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>; dev@dpdk.org
Subject: Re: [PATCH v2 0/3] adding rsa priv key feature flag


Hi Akhil, Fiona, Arek,



Gentle reminder.



Did you get a chance to look into these.



Thanks and regards

Ayuj Verma

________________________________
From: dev <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> on behalf of Ayuj Verma <ayverma@marvell.com<mailto:ayverma@marvell.com>>
Sent: 05 March 2019 14:41:18
To: akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>
Cc: arkadiuszx.kusztal@intel.com<mailto:arkadiuszx.kusztal@intel.com>; fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org<mailto:dev@dpdk.org>
Subject: [EXT] Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag

External Email

----------------------------------------------------------------------
Hi Akhil,


Did you get a chance to look into these.


Thanks and regards

Ayuj Verma

________________________________
From: Ayuj Verma
Sent: 27 February 2019 19:03:31
To: akhil.goyal@nxp.com<mailto:akhil.goyal@nxp.com>
Cc: arkadiuszx.kusztal@intel.com<mailto:arkadiuszx.kusztal@intel.com>; fiona.trahe@intel.com<mailto:fiona.trahe@intel.com>; Shally Verma; Sunila Sahu; Kanaka Durga Kotamarthy; Arvind Desai; dev@dpdk.org<mailto:dev@dpdk.org>; Ayuj Verma
Subject: [PATCH v2 0/3] adding rsa priv key feature flag

Some PMDs can only support RSA private key operations using CRT
(quintuple) or exponent key only. Thus it is required to add
feature flag (ff) in PMD to reflect which key type is supported
to perform sign and decrypt ops.

Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
to perform a private key op using CRT keys (quintuple) or
exponent or both.

App should query PMD feature flag to check if specific
key type is supported and call operation with relevant key type.

Ayuj Verma (3):
  lib/cryptodev: add rsa priv key feature flag
  crypto/openssl: set rsa private op feature flag
  test/crypto: check for rsa key type feature flag

 drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
 lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
 lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
 test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

--
2.20.0

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
  2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
                   ` (3 preceding siblings ...)
  2019-03-05  9:11 ` [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
@ 2019-03-13 19:06 ` Kusztal, ArkadiuszX
  2019-03-13 19:06   ` Kusztal, ArkadiuszX
  4 siblings, 1 reply; 15+ messages in thread
From: Kusztal, ArkadiuszX @ 2019-03-13 19:06 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal
  Cc: Trahe, Fiona, Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy,
	Arvind Desai, dev

V2 will be needed as test directory apparently changed its location.
Iam acking anyway.

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Wednesday, February 27, 2019 2:34 PM
> To: akhil.goyal@nxp.com
> Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Shally Verma <shallyv@marvell.com>; Sunila Sahu
> <ssahu@marvell.com>; Kanaka Durga Kotamarthy
> <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2 0/3] adding rsa priv key feature flag
> 
> Some PMDs can only support RSA private key operations using CRT
> (quintuple) or exponent key only. Thus it is required to add feature flag (ff) in
> PMD to reflect which key type is supported to perform sign and decrypt ops.
> 
> Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
> and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
> to perform a private key op using CRT keys (quintuple) or exponent or both.
> 
> App should query PMD feature flag to check if specific key type is supported
> and call operation with relevant key type.
> 
> Ayuj Verma (3):
>   lib/cryptodev: add rsa priv key feature flag
>   crypto/openssl: set rsa private op feature flag
>   test/crypto: check for rsa key type feature flag
> 
>  drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
>  lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
>  lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
>  test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
>  4 files changed, 37 insertions(+), 1 deletion(-)
> 
> --
> 2.20.0

Series-acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag
  2019-03-13 19:06 ` Kusztal, ArkadiuszX
@ 2019-03-13 19:06   ` Kusztal, ArkadiuszX
  0 siblings, 0 replies; 15+ messages in thread
From: Kusztal, ArkadiuszX @ 2019-03-13 19:06 UTC (permalink / raw)
  To: Ayuj Verma, akhil.goyal
  Cc: Trahe, Fiona, Shally Verma, Sunila Sahu, Kanaka Durga Kotamarthy,
	Arvind Desai, dev

V2 will be needed as test directory apparently changed its location.
Iam acking anyway.

> -----Original Message-----
> From: Ayuj Verma [mailto:ayverma@marvell.com]
> Sent: Wednesday, February 27, 2019 2:34 PM
> To: akhil.goyal@nxp.com
> Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Shally Verma <shallyv@marvell.com>; Sunila Sahu
> <ssahu@marvell.com>; Kanaka Durga Kotamarthy
> <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>;
> dev@dpdk.org; Ayuj Verma <ayverma@marvell.com>
> Subject: [PATCH v2 0/3] adding rsa priv key feature flag
> 
> Some PMDs can only support RSA private key operations using CRT
> (quintuple) or exponent key only. Thus it is required to add feature flag (ff) in
> PMD to reflect which key type is supported to perform sign and decrypt ops.
> 
> Thus add feature flags RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP
> and RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT which would mean support
> to perform a private key op using CRT keys (quintuple) or exponent or both.
> 
> App should query PMD feature flag to check if specific key type is supported
> and call operation with relevant key type.
> 
> Ayuj Verma (3):
>   lib/cryptodev: add rsa priv key feature flag
>   crypto/openssl: set rsa private op feature flag
>   test/crypto: check for rsa key type feature flag
> 
>  drivers/crypto/openssl/rte_openssl_pmd.c |  4 +++-
>  lib/librte_cryptodev/rte_cryptodev.c     |  4 ++++
>  lib/librte_cryptodev/rte_cryptodev.h     |  4 ++++
>  test/test/test_cryptodev_asym.c          | 26 ++++++++++++++++++++++++
>  4 files changed, 37 insertions(+), 1 deletion(-)
> 
> --
> 2.20.0

Series-acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
@ 2019-03-17 17:46   ` Akhil Goyal
  2019-03-17 17:46     ` Akhil Goyal
  2019-03-18 18:05     ` Ayuj Verma
  0 siblings, 2 replies; 15+ messages in thread
From: Akhil Goyal @ 2019-03-17 17:46 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Ayuj,

On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> 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 <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   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/rte_cryptodev.c
> index 700973530..bb90ac939 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>   		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/rte_cryptodev.h
> index a0bbcf932..298b35217 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
>   /**< 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 */
I believe these feature flags should be explained a bit in the 
documentation(doc/guides/cryptodevs/)
>   
>   
>   /**


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag
  2019-03-17 17:46   ` Akhil Goyal
@ 2019-03-17 17:46     ` Akhil Goyal
  2019-03-18 18:05     ` Ayuj Verma
  1 sibling, 0 replies; 15+ messages in thread
From: Akhil Goyal @ 2019-03-17 17:46 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Ayuj,

On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> 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 <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   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/rte_cryptodev.c
> index 700973530..bb90ac939 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>   		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/rte_cryptodev.h
> index a0bbcf932..298b35217 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
>   /**< 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 */
I believe these feature flags should be explained a bit in the 
documentation(doc/guides/cryptodevs/)
>   
>   
>   /**


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type feature flag
  2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type " Ayuj Verma
@ 2019-03-17 17:49   ` Akhil Goyal
  2019-03-17 17:49     ` Akhil Goyal
  0 siblings, 1 reply; 15+ messages in thread
From: Akhil Goyal @ 2019-03-17 17:49 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Ayuj,


On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> Check for RSA private key type feature flag in
> private key operations
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   test/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
Please rebase this patch.
>
> diff --git a/test/test/test_cryptodev_asym.c b/test/test/test_cryptodev_asym.c
> index 0f6fc5767..950a7bd00 100644
> --- a/test/test/test_cryptodev_asym.c
> +++ b/test/test/test_cryptodev_asym.c
> @@ -49,6 +49,7 @@ test_rsa_sign_verify(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
> @@ -56,6 +57,18 @@ test_rsa_sign_verify(void)
>   	uint8_t output_buf[TEST_DATA_SIZE] = {0};
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {
> @@ -183,12 +196,25 @@ test_rsa_enc_dec(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
>   	int status = TEST_SUCCESS;
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type feature flag
  2019-03-17 17:49   ` Akhil Goyal
@ 2019-03-17 17:49     ` Akhil Goyal
  0 siblings, 0 replies; 15+ messages in thread
From: Akhil Goyal @ 2019-03-17 17:49 UTC (permalink / raw)
  To: Ayuj Verma
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Ayuj,


On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> Check for RSA private key type feature flag in
> private key operations
>
> Signed-off-by: Ayuj Verma <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   test/test/test_cryptodev_asym.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
Please rebase this patch.
>
> diff --git a/test/test/test_cryptodev_asym.c b/test/test/test_cryptodev_asym.c
> index 0f6fc5767..950a7bd00 100644
> --- a/test/test/test_cryptodev_asym.c
> +++ b/test/test/test_cryptodev_asym.c
> @@ -49,6 +49,7 @@ test_rsa_sign_verify(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
> @@ -56,6 +57,18 @@ test_rsa_sign_verify(void)
>   	uint8_t output_buf[TEST_DATA_SIZE] = {0};
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {
> @@ -183,12 +196,25 @@ test_rsa_enc_dec(void)
>   	struct rte_mempool *op_mpool = ts_params->op_mpool;
>   	struct rte_mempool *sess_mpool = ts_params->session_mpool;
>   	uint8_t dev_id = ts_params->valid_devs[0];
> +	struct rte_cryptodev_info dev_info;
>   	struct rte_crypto_asym_op *asym_op = NULL;
>   	struct rte_crypto_op *op = NULL, *result_op = NULL;
>   	struct rte_cryptodev_asym_session *sess = NULL;
>   	int status = TEST_SUCCESS;
>   	uint8_t input_buf[TEST_DATA_SIZE] = {0};
>   
> +	/* test case supports op with exponent keyonly,
> +	 * so check for it in feature_flags
> +	 */
> +	rte_cryptodev_info_get(dev_id, &dev_info);
> +	if (!(dev_info.feature_flags &
> +				RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP)) {
> +		RTE_LOG(INFO, USER1,
> +				"Device doesn't support sign op with "
> +				"exponent key type. Test Skipped\n");
> +		return TEST_SKIPPED;
> +	}
> +
>   	sess = rte_cryptodev_asym_session_create(sess_mpool);
>   
>   	if (!sess) {


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag
  2019-03-17 17:46   ` Akhil Goyal
  2019-03-17 17:46     ` Akhil Goyal
@ 2019-03-18 18:05     ` Ayuj Verma
  2019-03-18 18:05       ` Ayuj Verma
  1 sibling, 1 reply; 15+ messages in thread
From: Ayuj Verma @ 2019-03-18 18:05 UTC (permalink / raw)
  To: Akhil Goyal, arkadiuszx.kusztal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Akhil, Arek,

Sure, I'll rebase the patch and will send v3 along with doc changes.

Thanks and regards
Ayuj Verma

-----Original Message-----
From: Akhil Goyal <akhil.goyal@nxp.com> 
Sent: Sunday, March 17, 2019 11:17 PM
To: Ayuj Verma <ayverma@marvell.com>
Cc: arkadiuszx.kusztal@intel.com; fiona.trahe@intel.com; Shally Verma <shallyv@marvell.com>; Sunila Sahu <ssahu@marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag

Hi Ayuj,

On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> 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 <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   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/rte_cryptodev.c
> index 700973530..bb90ac939 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>   		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/rte_cryptodev.h
> index a0bbcf932..298b35217 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
>   /**< 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 */
I believe these feature flags should be explained a bit in the
documentation(doc/guides/cryptodevs/)
>   
>   
>   /**


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag
  2019-03-18 18:05     ` Ayuj Verma
@ 2019-03-18 18:05       ` Ayuj Verma
  0 siblings, 0 replies; 15+ messages in thread
From: Ayuj Verma @ 2019-03-18 18:05 UTC (permalink / raw)
  To: Akhil Goyal, arkadiuszx.kusztal
  Cc: arkadiuszx.kusztal, fiona.trahe, Shally Verma, Sunila Sahu,
	Kanaka Durga Kotamarthy, Arvind Desai, dev

Hi Akhil, Arek,

Sure, I'll rebase the patch and will send v3 along with doc changes.

Thanks and regards
Ayuj Verma

-----Original Message-----
From: Akhil Goyal <akhil.goyal@nxp.com> 
Sent: Sunday, March 17, 2019 11:17 PM
To: Ayuj Verma <ayverma@marvell.com>
Cc: arkadiuszx.kusztal@intel.com; fiona.trahe@intel.com; Shally Verma <shallyv@marvell.com>; Sunila Sahu <ssahu@marvell.com>; Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>; Arvind Desai <adesai@marvell.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add rsa priv key feature flag

Hi Ayuj,

On 2/27/2019 7:03 PM, Ayuj Verma wrote:
> 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 <ayverma@marvell.com>
> Signed-off-by: Shally Verma <shallyv@marvell.com>
> ---
>   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/rte_cryptodev.c
> index 700973530..bb90ac939 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.c
> +++ b/lib/librte_cryptodev/rte_cryptodev.c
> @@ -486,6 +486,10 @@ rte_cryptodev_get_feature_name(uint64_t flag)
>   		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/rte_cryptodev.h
> index a0bbcf932..298b35217 100644
> --- a/lib/librte_cryptodev/rte_cryptodev.h
> +++ b/lib/librte_cryptodev/rte_cryptodev.h
> @@ -438,6 +438,10 @@ rte_cryptodev_asym_get_xform_enum(enum rte_crypto_asym_xform_type *xform_enum,
>   /**< 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 */
I believe these feature flags should be explained a bit in the
documentation(doc/guides/cryptodevs/)
>   
>   
>   /**


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-03-18 18:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 13:33 [dpdk-dev] [PATCH v2 0/3] adding rsa priv key feature flag Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 1/3] lib/cryptodev: add " Ayuj Verma
2019-03-17 17:46   ` Akhil Goyal
2019-03-17 17:46     ` Akhil Goyal
2019-03-18 18:05     ` Ayuj Verma
2019-03-18 18:05       ` Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 2/3] crypto/openssl: set rsa private op " Ayuj Verma
2019-02-27 13:33 ` [dpdk-dev] [PATCH v2 3/3] test/crypto: check for rsa key type " Ayuj Verma
2019-03-17 17:49   ` Akhil Goyal
2019-03-17 17:49     ` Akhil Goyal
2019-03-05  9:11 ` [dpdk-dev] [PATCH v2 0/3] adding rsa priv key " Ayuj Verma
2019-03-13  7:29   ` Ayuj Verma
2019-03-13 19:02     ` Kusztal, ArkadiuszX
2019-03-13 19:06 ` Kusztal, ArkadiuszX
2019-03-13 19:06   ` Kusztal, ArkadiuszX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).