From: Ayuj Verma Date: Thu, 28 Mar 2019 10:28:22 +0000 (+0000) Subject: cryptodev: add RSA private key feature flag X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=398ba4c13fc99edd80a7b05db84411a57f5a4b4c;p=dpdk.git cryptodev: add RSA private key feature flag 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 Acked-by: Akhil Goyal --- diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini index 810da0d7d9..5f3ed30490 100644 --- a/doc/guides/cryptodevs/features/default.ini +++ b/doc/guides/cryptodevs/features/default.ini @@ -23,6 +23,8 @@ OOP SGL In SGL Out = OOP SGL In LB Out = OOP LB In SGL Out = OOP LB In LB Out = +RSA PRIV OP KEY EXP = +RSA PRIV OP KEY QT = ; ; Supported crypto algorithms of a default crypto driver. diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst index 607e758da3..d7b7141a95 100644 --- a/doc/guides/cryptodevs/overview.rst +++ b/doc/guides/cryptodevs/overview.rst @@ -37,6 +37,12 @@ Supported Feature Flags which means that Out-of-place operation is supported, with linear input and output buffers. + - "RSA PRIV OP KEY EXP" feature flag means PMD support RSA private key + operation (Sign and Decrypt) using exponent key type only. + + - "RSA PRIV OP KEY QT" feature flag means PMD support RSA private key + operation (Sign and Decrypt) using quintuple (crt) type key only. + Supported Cipher Algorithms --------------------------- diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 871d7dda8b..cdc586a8a0 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 a0bbcf932c..298b35217e 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 */ /**