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 C2B12A00BE for ; Mon, 23 May 2022 14:45:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C8F04014F; Mon, 23 May 2022 14:45:13 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4291C40141 for ; Mon, 23 May 2022 14:45:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653309911; x=1684845911; h=from:to:subject:date:message-id:references:in-reply-to: mime-version; bh=DUxpSxyZJutHlIfhdzfMf4KD4D2hstCb+JSmiU0UUaY=; b=QCzBYeGno3kg61vxjcWewWKAXfBAZjtzlorjbTyBuhtUckG8NX9wjoIg xvGihNqvRfU1dmcZXgIl5zQgtsu3uHNW8d5KLFb69HAp+jBKF0lpqzCOZ v801zMY/Tik7wAJbF2ucYXI0SBb+iZF5hLzEB8UCb3+Zw2gNVeEoyLZge js2Kc+JFOJ2B47/qeyxjHjkHc7rGqYvZ19D5cX9bxbTvKHtgc2cDY51Ac +v+m4+kvCTY0bX32aBJKW6t9wu2bqqwwTPcntD8iJKtc0Gswv7wSe/kzy wfWec6Sn31YTVO78yrokIQQ4h2nCvPZ9qS+BjTApDEgRBpu6h8E/aBq+4 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="272930284" X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208,217";a="272930284" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 05:45:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,246,1647327600"; d="scan'208,217";a="608179530" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP; 23 May 2022 05:45:10 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 05:45:09 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 23 May 2022 05:45:09 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 23 May 2022 05:45:09 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 23 May 2022 05:45:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fgwzC+oluWMcVi7rh50vsyq+jNq158IoCAU8yindguPE1UtJz4GPqCg92ezw8vBP2rrOkakaC48OqbV9OPu5pH0tD4q2Pb0K+vTXAubFEw7PWkOwx9ykadJIiB5l4Mhk8u0x482z7V8X+xCdGcaAGEiy7/D6tptguFT6B3stiyMKs1T0MsuEpOKYRuTilx8Nf/sfeGNpnce05QTob7FqfP3BTPVrxFXtsnpJbDA3doE2UM9TIhKFU14ngaqlIpVe2VdxNrU1cKWKO+bV9lSRRME4aou2kNDUxxSaWaL4UyDySeqM+SdasRXX5kGnY1StRB4mEV1zjJAOkCinW6++BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5FOpRWmd31tk3fxIOqpcdtvlM+ewBAgmFMAvxZ79kG4=; b=RIVlMAtjY3vl75b519SZIA5c9gKXuLIXTAZz2s1uX60Z96zMP/EesNdbQYyPTDnccGcvKZfQrc0vNYGMXoLIHXGdjeuBGw9p4AXOiBEv6jvHaYCuOyxPjmUaf9d/xgcJjNIINT9ULwIv8Kss7OkaBnmsbQJ7Jm/+1qV73+oAzC8zV0yJ+9Fvk8Bm9kaAa5YbRWc/fe0e+bLwtQKg4cMCKSsG080/XesM5GQHc8Chzke/HVoslMBftFH2LvcE9V/INVdC/dMDP6NWj7d/iJXflwHCIP6YGz4JlZc06qkziKoZt6U3Wl7INKImPwrJYOErd/fBeHFBhIwqLmZ2zQArMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from CO1PR11MB5009.namprd11.prod.outlook.com (2603:10b6:303:9e::11) by MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.18; Mon, 23 May 2022 12:45:07 +0000 Received: from CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::f538:5980:ef0d:b634]) by CO1PR11MB5009.namprd11.prod.outlook.com ([fe80::f538:5980:ef0d:b634%6]) with mapi id 15.20.5273.023; Mon, 23 May 2022 12:45:07 +0000 From: "Kusztal, ArkadiuszX" To: Balakrishnan K , "users@dpdk.org" Subject: RE: how to use crypto openssl PMD for asymmetric encryption and decryption Thread-Topic: how to use crypto openssl PMD for asymmetric encryption and decryption Thread-Index: Adhul7L76HpVKxCxQgm6OmL7h9++VgACBMow Date: Mon, 23 May 2022 12:45:07 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_ActionId=1e9b2051-9f45-4073-b7f5-e6b509538b52; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_ContentBits=0; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_Enabled=true; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_Method=Privileged; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_Name=General-Test; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_SetDate=2022-05-23T11:32:59Z; MSIP_Label_5cbf6393-50e2-4904-bc3e-1804619f2b03_SiteId=20210462-2c5e-4ec8-b3e2-0be950f292ca; dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 40a07f0c-3a59-4fcd-ad81-08da3cba111c x-ms-traffictypediagnostic: MWHPR11MB1631:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rXQp3+FWYSFG0yibF1qPj8RH7AMDl5IyPcTR+6kpH1Tw2LWZl19YcBQZmW2a9HWKVRvh90Spgh+WD4DA2+j2J3UsnnnwqRKWlTUFyEQx3nwW4AOGMcRreKUdpreLHyz9sij4fHBlwmNMTowg2ehMxLpYMeQSyQR/d9JvNOwbmtqqWuET9XqqDUKEgKUBpRDuyn2cD//pu/99QZkLToTI83utpWRSonXE0EcfWF3a1PkaeSNCmdi8JXSp08KlEU2873Uu1HxKxpTunNS+Xxcq8o2KvYEx1qtmQ5NmMEnIOMN5V8nIjTAV+BsI6JvUqkmb7ukrHd4IoG1A89La21JxBw5fj1aALSIyorQXzJve5DDU9dBLBI7AmYTHihVn79KGKmO6RTk0FnSqNUTadI76lqv8Nj6z8ixZbLuuYEF9SWedcCCVb8wNjK8ZVMAUvinnfmir49D0lh7awKfkjuxpEqCMayWBDxmTITIVAkAL36hJ/siXOq6+/Hsky5fA9UHC1j2gaqg4yBmFvjozZmcrK8F0qY1lKTVNHZY+R1bd6m+katJh+3urLGzzRANOgdDPLvC7wY2dvX0FkxMjTG3qCjL86MKAp8wfYu2W3CMUI08Z/gICW3kQWpS7vF4NpGo1RMiaxFA+ERijTua+NENVipfFdaFdxfEgOmmwNaeOJHP7TQtWOYdaY5OOItHst1Gh1mtywKFia3swtrYlrfBKvA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5009.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(83380400001)(2906002)(33656002)(7696005)(9326002)(8936002)(5660300002)(55016003)(508600001)(86362001)(52536014)(26005)(82960400001)(110136005)(9686003)(38100700002)(38070700005)(316002)(122000001)(8676002)(6506007)(76116006)(186003)(64756008)(66446008)(66476007)(66556008)(66946007)(71200400001)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3x/V5l+L/68yYyLRSmAhSwVOyNTsqCbW9GEayu6aoXOUnAv8O05/BCrOqP1c?= =?us-ascii?Q?AHx7lvIiCvepAp6iWRKj3CQijfp+yD5pxeltYEdYW1S//j8HDmQAaL3va4mz?= =?us-ascii?Q?qRS0x1BN0nqCn2+BbLX9v5dCyYFXAo3kwD8+0dzY4OknvkiGG/IMEQRKJtCp?= =?us-ascii?Q?6KoRW3GzMY90AGPdAjnH9a1MBrExP+C4veb3vzLT4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VpMwfVHrCQWysQRGEaWmMgunLqcPQgh+LuqFp55h1sGnWS1BJC3x?= =?us-ascii?Q?XfQGpw5XiipkdW9/Clu+/LOiYKEzF8d1+qsJeGpWj79Xb11mjJOQ35yA2dlk?= =?us-ascii?Q?Y9FySIij1uePTfAzZJt0yfH674yW9PZkOhAlZaPuJDTIXv95URQ3s5ro0X4P?= =?us-ascii?Q?BP1N+dvpEYGXfz+5Nhn75zX+fuPaBBXcG/SX+oW23XYEc1+TjK1e3J7V3v1k?= =?us-ascii?Q?zQIJbALI3sSiR4aWqXHtuj4EZ5qduOD8gSzUf7mC8IvVAugSmv7kggeLaoDX?= =?us-ascii?Q?WF3XGUPaO+wb4MA9hSs226/BviJ8SpRJYI2/3aOyVkEHXAujfibTjs7FUcQ8?= =?us-ascii?Q?z0jB0VdNYSQ2dWXh60UiOhmlnIpEp7RXnXJHHNHUtPnF2kiLrdKtEbZjtgL7?= =?us-ascii?Q?geCrIQ0s00gYErppWG+daFkvM3TSjZDNUZiWwQKcwXZNvSqFxgDaXr+LXE0e?= =?us-ascii?Q?V5Vf0m/RDkGEdSIKtR4S41yOJWf9Dog6EZDfGW3hXyA43l+hc811iTSJFhDI?= =?us-ascii?Q?1CpN4DNx0n3wCzfilaHaczTr64sXLVt7dVmhh7W2mQic1PPjn32l60xFLcds?= =?us-ascii?Q?YHQ/Y7vEYQxkxBQqQTUTI0g9exLhFYMrZ55cQnS7nflzH1IBQn3aYo3UWbEV?= =?us-ascii?Q?YEOzN7T2KqGnkLg7NME6n/U5cHiohuY=3D?= Content-Type: multipart/alternative; boundary="_000_CO1PR11MB5009C6EB2CAC3C062FD24C489FD49CO1PR11MB5009namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5009.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40a07f0c-3a59-4fcd-ad81-08da3cba111c X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 12:45:07.4553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1JtS1asFxtCG8gLpeFBhnJJfW4AZ0LDhecycCy5sU+krktHJuzCvzHkONIXvlCs+5lKd4om8teJKwNZfWW49H0Gp3nuL9duzjPgWw/SGBjQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1631 X-OriginatorOrg: intel.com X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --_000_CO1PR11MB5009C6EB2CAC3C062FD24C489FD49CO1PR11MB5009namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Bala, Ciphertext will be written into asym_op->rsa.cipher.data (not message.data)= by the PMD, here you are using same address for both hex dumps. Although there is a bug in debug_hexdump in this function which may cause t= his confusion. Plus, the test you are referring is PWCT test (Pairwise conditional test) -= > it will encrypt, then decrypt. Please take a look into this comment in queue_ops_rsa_enc_dec function: /* Use the resulted output as decryption Input vector* So above this line there is an encryption part. Below is decryption. Regards, Arek From: Balakrishnan K Sent: Monday, May 23, 2022 1:33 PM To: users@dpdk.org Subject: how to use crypto openssl PMD for asymmetric encryption and decryp= tion Hi All, I am new to dpdk. Planning to use openssl crypto PMD for encrypting/decr= ypting the packets. Couldn't find much documents on openssl PMD for asymmetric encryption/decry= ption. Any one please point me in the right document. I have tried to run the test cases wrote for asymmetric crypto using openss= l virtual PMD. But the output of particular test case is same after the encryption done. File : app/test/test_cryptodev_asym.c Test executable: ./app/test/dpdk-test Test case : test_rsa_enc_dec Input given to encryption: message at [0x1894e60], len=3D20 00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD A8 EB | ...U./...{./...= . 00000010: 7E 78 A0 50 | ~x.P After processing the output also looks like same : encrypted message exist at [0x1894e60], len=3D20 00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD A8 EB | ...U./...{./...= . 00000010: 7E 78 A0 50 Regards, Bala --_000_CO1PR11MB5009C6EB2CAC3C062FD24C489FD49CO1PR11MB5009namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Bala,

 

Ciphertext will be written into asym_op->rsa.ciph= er.data (not message.data) by the PMD, here you are using same address for = both hex dumps.

Although there is a bug in debug_hexdump in this fun= ction which may cause this confusion.

 

Plus, the test you are referring is PWCT test (Pairw= ise conditional test) -> it will encrypt, then decrypt.

Please take a look into this comment in queue_ops_rs= a_enc_dec function:

/* Use the resulted output as decryption Input vecto= r*

So above this line there is an encryption part.=

Below is decryption.     &n= bsp;    

 

Regards,

Arek

 

From: Balakrishnan K <Balakrishnan.K1@tata= communications.com>
Sent: Monday, May 23, 2022 1:33 PM
To: users@dpdk.org
Subject: how to use crypto openssl PMD for asymmetric encryption and= decryption

 

Hi All,

   I am new to dpdk. Planning to use opens= sl crypto PMD for encrypting/decrypting  the packets.

Couldn’t find much documents on openssl PMD fo= r asymmetric encryption/decryption.

Any one please point me in the right document.<= /o:p>

 

I have tried to run the test cases wrote for asymmet= ric crypto using openssl virtual PMD.

But the output of particular test case is same after= the encryption done.

 

File : app/test/test_cryptodev_asym.c

Test executable: ./app/test/dpdk-test

Test case : test_rsa_enc_dec

   

Input given to encryption:    = ;          

message at [0x1894e60], len=3D20

00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD = A8 EB | ...U./...{./....

00000010: 7E 78 A0 50     &= nbsp;           &nbs= p;            &= nbsp;      | ~x.P

 

After processing the output also looks like same = :

encrypted message exist at [0x1894e60], len=3D20

00000000: F8 BA 1A 55 D0 2F 85 AE 96 7B B6 2F B6 CD = A8 EB | ...U./...{./....

00000010: 7E 78 A0 50

 

 

Regards,

Bala

--_000_CO1PR11MB5009C6EB2CAC3C062FD24C489FD49CO1PR11MB5009namp_--