From patchwork Fri Feb 11 16:02:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 107376 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C904A0032; Fri, 11 Feb 2022 18:09:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F14C94114A; Fri, 11 Feb 2022 18:09:16 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id E6DA340042 for ; Fri, 11 Feb 2022 18:09:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644599355; x=1676135355; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=60/E8/0TYBJDJeNoRk1d/4/9Mva6pGYTJEcyuwZJPtI=; b=M8J/zybuPBkT9phcwR3xrx6vi0XdwgBo5YD+WvXftKG1LfQncIsBH7dv w1WfgwABvPfDCXr1Xkv070MdESDiCVkaY/sXUYve/ZzwEl6MVFFz4Zb4g buRi0POYtUyP7bvFCaIqsAj4ELfj5yfpWFIdF03VEl63zsBU1PppBR2D2 mY0XQKmQ2s1gW6+rryfLbhyudkt3bCGvF23IawRUSFauHrdrh64a1DFzx 4R+c/dtC7VqSE18ihZL9w2UipfSkOTP86PeIs7p9qaftv3Lxdt2fAiXUM Pq6mmonYdB/C+UBb+jegizdYwoVKpeztgTCS5LCiD667w8WOtZWu2GGlI A==; X-IronPort-AV: E=McAfee;i="6200,9189,10255"; a="247360849" X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="247360849" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 09:07:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,361,1635231600"; d="scan'208";a="488241701" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by orsmga006.jf.intel.com with ESMTP; 11 Feb 2022 09:07:50 -0800 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, Arek Kusztal Subject: [PATCH v3 1/4] crypto: add dsa random number k Date: Fri, 11 Feb 2022 16:02:35 +0000 Message-Id: <20220211160238.90065-2-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20220211160238.90065-1-arkadiuszx.kusztal@intel.com> References: <20220211160238.90065-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 This commit adds random number 'k' to dsa op param struct. This parameter is crucial in stiuations where: - PMD cannot generate random number - User would like to provide random source Additionally, it makes DSA consistent with ECDSA in terms of 'k' which includes this parameter. Signed-off-by: Arek Kusztal --- devtools/libabigail.abignore | 5 +++++ lib/cryptodev/rte_crypto_asym.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 4b676f317d..4463df9dd6 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -11,3 +11,8 @@ ; Ignore generated PMD information strings [suppress_variable] name_regexp = _pmd_info$ + +; Ignore changes to rte_crypto_asym_op, asymmetric crypto API +; is experimental +[suppress_type] + name = rte_crypto_asym_op \ No newline at end of file diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index 9c866f553f..e0def3d9ab 100644 --- a/lib/cryptodev/rte_crypto_asym.h +++ b/lib/cryptodev/rte_crypto_asym.h @@ -547,6 +547,10 @@ struct rte_crypto_dsa_op_param { /**< Signature Generation or Verification */ rte_crypto_param message; /**< input message to be signed or verified */ + rte_crypto_param k; + /**< Per-message secret number, which is an integer + * in the interval (1, q-1) + */ rte_crypto_param r; /**< dsa sign component 'r' value *