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 AAE75C433F5 for ; Mon, 30 May 2022 15:40:59 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E3FE42B9B; Mon, 30 May 2022 17:40:00 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id BEFBC42B92 for ; Mon, 30 May 2022 17:39: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=1653925197; x=1685461197; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=rLEwxHojhTNWSxQmrGDHiTYkU/kvqTVeC5XT09I1gbw=; b=j8W0RR36xoUbX/NZUzyQSLbYyXOveDPYGzJ+e3XjLEYdrVtNVkOQeoTb fnKJDFxONiIQrwndz+TmgpXDsV5WhOiF6fE/FG/RCfD9a2qbHNvQHw5e8 g6HyN9BpfbfjJ8j/cHF+kj0SyLf+3yNSF754TYuRzdIRmXd0HluaDV2r+ wSXbYi01/rA2MemHVjPGgWfglnaukqu+dFijJvWyqyDkrw+PbEpZZIwj0 pQeMK80WN6WrMe717NsKT1f/YBDWwNZ090cafEfaFolE50tQIUI3IC4/0 dbbkpTdt63hNuV0fyUJaVP+SnpWK0Z0VIULl14k9DcFBNuWin4VV82UEi Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10363"; a="338069496" X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="338069496" 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:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,263,1647327600"; d="scan'208";a="751679004" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga005.jf.intel.com with ESMTP; 30 May 2022 08:39:56 -0700 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v3 11/12] cryptodev: clarify rsa verify with none padding Date: Mon, 30 May 2022 15:31:58 +0100 Message-Id: <20220530143159.13672-12-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 - 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