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 5F85FA0548; Tue, 31 May 2022 07:13:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0DEE427EE; Tue, 31 May 2022 07:12:59 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 5D01542B8B for ; Tue, 31 May 2022 07:12:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653973977; x=1685509977; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=rLEwxHojhTNWSxQmrGDHiTYkU/kvqTVeC5XT09I1gbw=; b=lHBudkjE/cNKBI201HtkDfLQYifelhtOQnjQFoPOF6sMBjLLqgmCeEn4 xHpc+JtvKvS2o6SJCWo2s937URdce/XRdmlXDw+AncPls2Xr3S8HMpE9d EgxuTVU9GZc+UKdkSsGSu743pHH8NkWiHZFdWzcf42qIhTGzsLOZoCYpI eE/KHBT72zY/7wv39dYszSy4fMLnIDGYm+6twvGNesa1XUpVlJHnFIiTb TghShi4KbOS1o88HISjh4+lmVl/w88Jlz/SPL9VKUL73QuBS1j7tMYZmU r/rssx7erlw0x85B+6rBsjTNZY/6iyRq5XdtjTRltsjeUexVxvB981cdo w==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338181324" X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="338181324" 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:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,264,1647327600"; d="scan'208";a="576220593" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga007.jf.intel.com with ESMTP; 30 May 2022 22:12:55 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v4 11/12] cryptodev: clarify rsa verify with none padding Date: Tue, 31 May 2022 05:04:38 +0100 Message-Id: <20220531040439.15862-12-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 - Clarified where should output be stored of signature decryption with padding none. PMD is not able to know what padding algorithm was used, therefore decrypted signature should be returned to the user. - Removed incorrect big-endian constraints. Not all data in RSA can be treated as big endian integer, therefore some of the constraints were lifted. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 76fabc61b5..d31642680f 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -398,8 +398,6 @@ struct rte_crypto_rsa_op_param { * (i.e. must be at least RSA key size). The message.length * field should be 0 and will be overwritten by the PMD * with the decrypted length. - * - * All data is in Octet-string network byte order format. */ rte_crypto_param cipher; @@ -414,7 +412,8 @@ struct rte_crypto_rsa_op_param { * at least RSA key size). The cipher.length field should * be 0 and will be overwritten by the PMD with the encrypted length. * - * All data is in Octet-string network byte order format. + * When RTE_CRYPTO_RSA_PADDING_NONE and RTE_CRYPTO_ASYM_OP_VERIFY + * selected, this is an output of decrypted signature. */ rte_crypto_param sign; @@ -428,8 +427,6 @@ struct rte_crypto_rsa_op_param { * with enough memory to hold signature output (i.e. must be * at least RSA key size). The sign.length field should * be 0 and will be overwritten by the PMD with the signature length. - * - * All data is in Octet-string network byte order format. */ struct rte_crypto_rsa_padding padding; -- 2.13.6