From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id D321AC433EF for ; Mon, 30 May 2022 15:41:06 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D99A42BAB; Mon, 30 May 2022 17:40:02 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 52C4442B96 for ; Mon, 30 May 2022 17:39:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653925199; x=1685461199; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=qPzNn0dIzgpShQjXGteVY1DVSO4asjnXaU46qjcB5Qs=; b=jWjFJaV62OyVT5otjcQxxt88eCOvqBP72rxbLs8CRqYJhgJPlGFoZN23 kTpanwsTH2+FBufxqp6ThP2ErTgyFGPQPkRQv1TMbtSq2rF8Qlij3IoIh Z86mNclqZZnXZ5+QctZjlgPG4WQ+nZBW7AU94mZAs+8CjC6OlhbEIpFQC cc1nudkKTTx1TAPzbEC0CMqCxVlp/JTNd77spVUpiDaBoFaithR9GPBkB xXl6DBuju+Le8ZgmLVRM9VDDESBYakdzbN04chNMbr92A0/8vv25G8NsE I2PJSxJOKK+7OwnaxwFmoufGVwNRsaRDPpADo4FY+Yp/L/bp21ep2hmAh Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338069507" X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="338069507" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 08:39:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="751679092" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga005.jf.intel.com with ESMTP; 30 May 2022 08:39:57 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v3 12/12] cryptodev: add salt length and optional label Date: Mon, 30 May 2022 15:31:59 +0100 Message-Id: <20220530143159.13672-13-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220530143159.13672-1-arkadiuszx.kusztal@intel.com> References: <20220530143159.13672-1-arkadiuszx.kusztal@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org - Added salt length and optional label. Common parameters to PSS and OAEP padding for RSA. - Changed RSA hash padding fields names. Now it corresponds to the RSA documents. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index d31642680f..a755eaff7b 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -241,7 +241,7 @@ struct rte_crypto_rsa_priv_key_qt { struct rte_crypto_rsa_padding { enum rte_crypto_rsa_padding_type type; /**< RSA padding scheme to be used for transform */ - enum rte_crypto_auth_algorithm md; + enum rte_crypto_auth_algorithm hash; /**< * RSA padding hash algorithm * Valid hash algorithms are: @@ -266,7 +266,7 @@ struct rte_crypto_rsa_padding { * This field shall be set with the hash algorithm used * in the padding scheme (and to create the input message digest) */ - enum rte_crypto_auth_algorithm mgf1md; + enum rte_crypto_auth_algorithm mgf1hash; /**< * Hash algorithm to be used for mask generation if the * padding scheme is either OAEP or PSS. If the padding @@ -274,6 +274,21 @@ struct rte_crypto_rsa_padding { * for mask generation. Valid hash algorithms are: * MD5, SHA1, SHA224, SHA256, SHA384, SHA512 */ + uint16_t pss_saltlen; + /**< + * RSA PSS padding salt length + * + * Used only when RTE_CRYPTO_RSA_PADDING_PSS padding is selected, + * otherwise ignored. + */ + rte_crypto_param oaep_label; + /**< + * RSA OAEP padding optional label + * + * Used only when RTE_CRYPTO_RSA_PADDING_OAEP padding is selected, + * otherwise ignored. If label.data == NULL, a default + * label (empty string) is used. + */ }; /** -- 2.13.6