[v4,05/11] cryptodev: add information about message format when signing with RSA

Message ID 20190717125111.11288-6-arkadiuszx.kusztal@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series Rework API for RSA algorithm in asymmetric crypto |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Arkadiusz Kusztal July 17, 2019, 12:51 p.m. UTC
  This patch adds information about format of the message should have
before sending it to the signing operation when using RSA algorithm.

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 lib/librte_cryptodev/rte_crypto_asym.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_cryptodev/rte_crypto_asym.h b/lib/librte_cryptodev/rte_crypto_asym.h
index ab305a6..4a86610 100644
--- a/lib/librte_cryptodev/rte_crypto_asym.h
+++ b/lib/librte_cryptodev/rte_crypto_asym.h
@@ -408,9 +408,17 @@  struct rte_crypto_rsa_op_param {
 	 * When RTE_CRYPTO_ASYM_OP_DECRYPT op_type used underlying array
 	 * should have been allocated with enough memory to hold plaintext
 	 * output (bigger or equal to RSA key size).
+	 *
+	 * When RTE_CRYPTO_ASYM_OP_SIGN op_type used and following padding
+	 * type:
+	 * - padding PKCS1_5:
+	 * data provided should contain `algorithmIdentifier` in DER encoded
+	 * format concatenated with message digest (as per spec rfc8017 9.2)
+	 * - padding PSS
+	 * data provided should contain message digest of the message
+	 * to be signed
 	 */
 
-
 	rte_crypto_param cipher;
 	/**<
 	 * Pointer to data