From patchwork Mon Feb 7 11:35:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Kusztal X-Patchwork-Id: 106962 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 1A559A034F; Mon, 7 Feb 2022 12:36:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06CC2410FC; Mon, 7 Feb 2022 12:36:11 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 78640410FC for ; Mon, 7 Feb 2022 12:36:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644233769; x=1675769769; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=XGd1gjQSOKcjPFyeKWfilSEzWTZ7LfWmsDIkhgrTrKk=; b=n072AphgicpBtdSfM0zHhACvAcNnS/MEz/oHS2gqWF183qgSLNPY4HG+ g8yuH/qoIwQuDrwVbwchmg3FHyuiblJUE36H6cHIKG8QM4KPh1TUyCEE/ 9eFuRt2ggJneSzTXQoZVo4glQm44FRRZ5SxO6D/rR5n+8/3VsiwJ+UDWS I2f/a4ZowFrDLv7Yeq2o6sReMX/RCLS9C2TUqOC9IQZop3y9l3PJJfStS K2YkQkf+QkF7ldhGQ3uR0A9H8CnXtM+JM5kD3XoiGgrnpPIE21HvhC6kQ ID5dya1lI409k16J0VQJst4c7gx9S6wnefdPjZo1VfSgqpz2B7NHACM82 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="248647172" X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="248647172" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 03:36:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,349,1635231600"; d="scan'208";a="677731295" Received: from silpixa00400308.ir.intel.com ([10.237.214.95]) by fmsmga001.fm.intel.com with ESMTP; 07 Feb 2022 03:36:07 -0800 From: Arek Kusztal To: dev@dpdk.org Cc: gakhil@marvell.com, roy.fan.zhang@intel.com, rbalu@marvell.com, Arek Kusztal Subject: [PATCH v2 1/4] crypto: add dsa random number k Date: Mon, 7 Feb 2022 11:35:52 +0000 Message-Id: <20220207113555.8431-2-arkadiuszx.kusztal@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220207113555.8431-1-arkadiuszx.kusztal@intel.com> References: <20220207113555.8431-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 stituation where: - PMD cannot generate random number - user would like to provide random source Addtionally it makes DSA consistent with ECDSA in terms of 'k' which includes this parameter. Signed-off-by: Arek Kusztal --- lib/cryptodev/rte_crypto_asym.h | 4 ++++ 1 file changed, 4 insertions(+) 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 *