From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 321D5A0548; Tue, 31 May 2022 07:13:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9633842B9D; Tue, 31 May 2022 07:13:02 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 4765942B84 for ; Tue, 31 May 2022 07:12: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=1653973979; x=1685509979; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=qPzNn0dIzgpShQjXGteVY1DVSO4asjnXaU46qjcB5Qs=; b=Z/MchieIQlNN0sGbrQBsPmHkrlojWycIcbV/bHQapOEnu9TjzOdrb/Zr Z6QXvBVXiyIv5qkhu8REV5C3EYq4RDqd7yHYfd6q4Fno89FFqavQytsqa KIF3AzZEPJ/WhZaPMvMTI0lnqGD3CRZggX9zC7UZPhg/oF5tL68UkOKyf gShQ33G30UGGoMFPkFsQnijemUsUcSc99JksCmjAPZF+aPkOVcuSnbtHm fLYkX2nVtUc1eNps2pASANkaVk7G1QGRGcxf70qDKS2QknOAW50k2Odsv bQ27vlugvn0Jp1tCTvWUdxobg1k+EPtaRVmQp8gsJQF/HhGa4wTe9JZwg A==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338181332" X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="338181332" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 22:12:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="576220606" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga007.jf.intel.com with ESMTP; 30 May 2022 22:12:57 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v4 12/12] cryptodev: add salt length and optional label Date: Tue, 31 May 2022 05:04:39 +0100 Message-Id: <20220531040439.15862-13-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220531040439.15862-1-arkadiuszx.kusztal@intel.com> References: <20220531040439.15862-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