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 <ayve...@marvell.com> Signed-off-by: Shally Verma <shal...@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