From patchwork Tue Oct 29 06:01:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 147573 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 3359545C07; Tue, 29 Oct 2024 07:34:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D12624014F; Tue, 29 Oct 2024 07:34:48 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2653840144 for ; Tue, 29 Oct 2024 07:34:46 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49T0A8Lj014713; Mon, 28 Oct 2024 23:34:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=kKOW79ARQ6oXjMjXDgi7332 W7hHOxMXAXASv/IjxGlI=; b=Q5X0S1Wy9hxJgNBHpS0+bMqfEe2WpcNePD2dT5Z 5T/nk4NC/xy2yU/0u6yrvb03ZrlxFmCNlsm3Ojji1/pH9ZpepdR/wmYcxR0ewjRE eocudYO8zu8LAmaE+uidjzkpOFrTYYJQ73L8qdCZD0LPwQIv+8YoU5Vp+ZXtSwst 03POJnl/fHo+u8z7I2wq6uDPSi9ZF3gLnz+Au2b3esrp/Boag80kEzng3MjIvX8O zQbNNfqlkcIjgrjjiHwojjTMoFnFspwYxBXBoXmFiM2gqHGF6OpmSfEij0HulYRw 24VyunyZYirLO6v5Myd4nIH2zoNvzuDtFWmsuAzdm6oqnxg== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42jmx40sh0-10 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Oct 2024 23:34:45 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 28 Oct 2024 23:34:44 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 28 Oct 2024 23:34:44 -0700 Received: from IN-lckQE5Rwctls.marvell.com (unknown [10.193.68.89]) by maili.marvell.com (Postfix) with ESMTP id 658B6626776; Mon, 28 Oct 2024 23:01:11 -0700 (PDT) From: Gowrishankar Muthukrishnan To: , Brian Dooley , "Gowrishankar Muthukrishnan" CC: Anoob Joseph , Akhil Goyal Subject: [PATCH v1] examples/fips_validation: prehash input for RSA Date: Tue, 29 Oct 2024 11:31:02 +0530 Message-ID: <20241029060107.1135-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 6HV-L4mU9JQTri-Dg_sLtz8-_rkoygX2 X-Proofpoint-GUID: 6HV-L4mU9JQTri-Dg_sLtz8-_rkoygX2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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 Plain text needs to be prehashed for RSA as well in asymmetric crypto validation. Fixes: 12ede9ac497f ("examples/fips_validation: support EdDSA") Signed-off-by: Gowrishankar Muthukrishnan Acked-by: Brian Dooley --- examples/fips_validation/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index b34015ad9f..f21826e9d7 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -1940,7 +1940,8 @@ fips_run_test(void) return fips_run_asym_test(); } - if (info.algo == FIPS_TEST_ALGO_ECDSA) { + if (info.algo == FIPS_TEST_ALGO_ECDSA || + info.algo == FIPS_TEST_ALGO_RSA) { vec.cipher_auth.digest.len = parse_test_sha_hash_size(info.interim_info.ecdsa_data.auth); test_ops.prepare_sym_xform = prepare_sha_xform;