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 671FF45702; Wed, 31 Jul 2024 16:28:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5685D42795; Wed, 31 Jul 2024 16:28:51 +0200 (CEST) Received: from fout1-smtp.messagingengine.com (fout1-smtp.messagingengine.com [103.168.172.144]) by mails.dpdk.org (Postfix) with ESMTP id 44C054065A for ; Wed, 31 Jul 2024 16:27:01 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id B2E911381EB5; Wed, 31 Jul 2024 10:27:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 31 Jul 2024 10:27:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1722436020; x=1722522420; bh=XGtpwedRI7ms7+Vov+TrgI5YoE2MVLeya+0urWH1wGQ=; b= dW+ImHG2e1bmLvrS/sGv+7F9TG1X7zdByyvvP/ZtynZ4kHvrdnsHGZcc7+S/r6eB UKTz0PWQFeZS1EeSQLdlMJdn9Z30BDkMGnivXvIQT6V7ChrLIE/rALxEh/jGN5SK p5/vxaAHbU/E0baqzGBPzKftycyEC4qGy9F6Iv/0tbyZSKcGNuf3vdNKAeDxjeJq 8//Or3rJank9RjZhhKeSxbL4t5MQO2XIEGwBgoxk04v8sGPxtJXoESR8H3hG7GZ1 4JN8xntqGuYYX9yEfurrFGCCj2lmmunN8twApnYN1+U8UrVr9iZlrlLhpNtm/htY U13hGzSR6uQcpb2e+YFI4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722436020; x= 1722522420; bh=XGtpwedRI7ms7+Vov+TrgI5YoE2MVLeya+0urWH1wGQ=; b=r uaVSizpz/CqC2VSb6/T42jsGiFYyR6FOMjiCOjVym4zJ57FmLwRILOEzY6JHd3t+ IkobdVAXrHfEDHdEtOcQ4H3CNecmE2LkeiHchFqO/1qtgf21zE0JGyZFiWeRSH2c q4tQyLUjnj/VFc7+2nRH8gvkqWE+fMRkDI41NSx1ZYV6mVsSP/TZrO8QczdMG5l5 dP29iiZmZyyNW3YBDRRBMDQhaLbjj8prdoROKcz8jpNmj+ELcYdhFq/HOsp3UUqZ UbIlmEB1eH9jQuEvqDU0RbbdHpyKzMhww/+7Pg3z6DMZSMyC9fqUPvSa9d0mlvZY jmhYV4mfMtuS1nBn1gbjw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeeigdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepjeduveehieevuddutdevfffgtdegkeeuveejffejgedtgeegkefg vdeugfefkeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jul 2024 10:26:56 -0400 (EDT) From: Thomas Monjalon To: Gowrishankar Muthukrishnan Cc: dev@dpdk.org, "Kusztal, ArkadiuszX" , "dev@dpdk.org" , Anoob Joseph , "Richardson, Bruce" , "ciara.power@intel.com" , Jerin Jacob , "fanzhang.oss@gmail.com" , "Ji, Kai" , "jack.bond-preston@foss.arm.com" , "Marchand, David" , "hemant.agrawal@nxp.com" , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "ruifeng.wang@arm.com" , "Gujjar, Abhinandan S" , "maxime.coquelin@redhat.com" , "chenbox@nvidia.com" , "sunilprakashrao.uttarwar@amd.com" , "andrew.boyer@amd.com" , "ajit.khaparde@broadcom.com" , "raveendra.padasalagi@broadcom.com" , "vikas.gupta@broadcom.com" , "zhangfei.gao@linaro.org" , "g.singh@nxp.com" , "jianjay.zhou@huawei.com" , "Daly, Lee" Subject: Re: [PATCH] doc: announce cryptodev changes to offload RSA in VirtIO Date: Wed, 31 Jul 2024 16:26:54 +0200 Message-ID: <4441764.MSiuQNM8U4@thomas> In-Reply-To: <4036290.2iPT33SAM4@thomas> References: <20240722145551.1159-1-gmuthukrishn@marvell.com> <4036290.2iPT33SAM4@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 I'm not sure why we don't have a consensus on an idea proposed as RFC in September 2023. Because there is not enough involvement outside of the Marvell team, I will keep a vague announce for the first item: cryptodev: Some changes may happen to manage RSA padding for virtio-crypto. The second item is applied verbatim, thanks. 31/07/2024 14:51, Thomas Monjalon: > 30/07/2024 16:39, Gowrishankar Muthukrishnan: > > Hi, > > We need to fix padding info in DPDK as per VirtIO specification in order to support RSA in virtio devices. VirtIO-crypto specification and DPDK specification differs in the way padding is handled. > > With current DPDK & virtio specification, it is impossible to support RSA in virtio-crypto. If you think DPDK spec should not be modified, we will try to amend the virtIO spec to match DPDK, but since we do not know if the virtIO community would accept, can we merge the deprecation notice? > > There is a long list of Cc but I see no support outside of Marvell. > > > > > >>> +* cryptodev: The struct rte_crypto_rsa_padding will be moved from > > >>> + rte_crypto_rsa_op_param struct to rte_crypto_rsa_xform struct, > > >>> + breaking ABI. The new location is recommended to comply with > > >>> + virtio-crypto specification. Applications and drivers using > > >>> + this struct will be updated. > > >>> + > > > > > > >> The problem here, I see is that there is one private key but multiple combinations of padding. > > >> Therefore, for every padding variation, we need to copy the same private key anew, duplicating it in memory. > > >> The only reason for me to keep a session-like struct in asymmetric crypto was exactly this. > > > > > > Each padding scheme in RSA has its own pros and cons (in terms of implementations as well). > > > When we share the same private key for Sign (and its public key in case of Encryption) between > > > multiple crypto ops (varying by padding schemes among cops), a vulnerable attack against one scheme > > > could potentially open door to used private key in the session and hence take advantage > > > on other crypto operations. > > > > > > I think, this could be one reason for why VirtIO spec mandates padding info as session parameter. > > > Hence, more than duplicating in memory, private and public keys are secured and in catastrophe, > > > only that session could be destroyed. > > > > > > >>> +* cryptodev: The rte_crypto_rsa_xform struct member to hold private key > > >>> + in either exponent or quintuple format is changed from union to > > >>> +struct > > >>> + data type. This change is to support ASN.1 syntax (RFC 3447 Appendix A.1.2). > > >>> + This change will not break existing applications. > > > > > > > > This one I agree. RFC 8017 obsoletes RFC 3447.