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 6F3BBA04FF for ; Tue, 24 May 2022 14:12:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6052E40140; Tue, 24 May 2022 14:12:24 +0200 (CEST) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2073.outbound.protection.outlook.com [40.107.255.73]) by mails.dpdk.org (Postfix) with ESMTP id A6852400D6 for ; Tue, 24 May 2022 14:12:22 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=VQg2sYaf/i3QUSOAE7RA27YiWc25EmwklU0+oYBvjsINcrw9S8++G53LfB3CqBlYL6HhVVUrAF5zOOtihG9EKn8VmFSCw94k1Jgxs8iTSQRf3pLNuspbq/tZ295lGxxsnT8bbhHuUOfzHCwknF72l6l9vWzRu0ByX0DK4I2EY3IzSGdbdsJUOcbIVG8XLDWo08oVurtNhFtv2hs0sdkrRtpMeNw56lLVHxC5WGlKWasbbfHt9eNNoWbea/CW1iLqMmMTO7hCAAuXsW4DaD5HDe+pohazroe8KHCpnXxcDUPFoBy3dXZUfQY071JRpWoXdeKBVHS9OtAEbd2yU1YO2Q== ARC-Message-Signature: i=2; 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=P8ppajcoir3jkqKMujNTfWZ2KDDVb9GsAFixmyCZBak=; b=FbkXyUhlyx7kwQWKuyqhCZYuoqbLIAyEJd5dSlKcWD4Az+EhBj9hJv8zorCti1/2DKpEu9onrzO2rpIvPkZDC7f62H35d8d7ici8qybc5NoWOhAkSu947Gh9O78o02c69ohuR1oUQBhzEyIkGidxfBMuzBRTmF+4JuoYYi+q3Ud0pLXcjNw2fSRdQEYwMtC/HzEd/Ua9+fvDZfJDALD3wbbMnaCouC8fu+ejjQ1Othqy0sFL28M6Zy74uPsXkvI3/+v49Q6dwWux/GfWzs2sJuVDYkZZaXKX8YPh9w2U4qYj60HdPUDyjKbq7FTm4bMW/bacsWyv1utqC34oVuyIog== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 52.62.169.21) smtp.rcpttodomain=intel.com smtp.mailfrom=tatacommunications.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=tatacommunications.com; dkim=pass (signature was verified) header.d=tatacommunications.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=tatacommunications.com] dkim=[1,1,header.d=tatacommunications.com] dmarc=[1,1,header.from=tatacommunications.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tatacommunications.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P8ppajcoir3jkqKMujNTfWZ2KDDVb9GsAFixmyCZBak=; b=MwyyclYCimO3Bc4QWXWUhLifta7ssIFRCC0TVxywDASBlOHjXoxy9mPxFiYGhiCwf51oadhmGvuYy+Vu7qrYUtqhlg+TtJozESMAXtipKCXeNnL+VQhFYVlmYgdH8A2XRf3EnliEB/aCY02sAUgQsSs/sQrXlRSZY905kYLSCAPG//u2JKKoWzf/RkflyZOE4s/C3zb4dRGBRNJY9o4WDyy8JwFXvDYu99IWYlL7zv+5Nn3XzyGIvBIGsErYQIUXH+AjOCWr2wK9WvRCMjkjcg3jxZDFtqG3gu3ms9l1EeJ1bwneMVZACwzNOkCTksZvwMuqYArUba962iDoTHwutg== Received: from TYWPR01CA0028.jpnprd01.prod.outlook.com (2603:1096:400:aa::15) by TYZPR04MB4191.apcprd04.prod.outlook.com (2603:1096:400:24::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Tue, 24 May 2022 12:12:20 +0000 Received: from TYZAPC01FT052.eop-APC01.prod.protection.outlook.com (2603:1096:400:aa:cafe::1a) by TYWPR01CA0028.outlook.office365.com (2603:1096:400:aa::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Tue, 24 May 2022 12:12:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 52.62.169.21) smtp.mailfrom=tatacommunications.com; dkim=pass (signature was verified) header.d=tatacommunications.com;dmarc=pass action=none header.from=tatacommunications.com; Received-SPF: Pass (protection.outlook.com: domain of tatacommunications.com designates 52.62.169.21 as permitted sender) receiver=protection.outlook.com; client-ip=52.62.169.21; helo=sydapipop-haraka-inline00.vpc-a3a96cc4.ase2.shn; pr=C Received: from sydapipop-haraka-inline00.vpc-a3a96cc4.ase2.shn (52.62.169.21) by TYZAPC01FT052.mail.protection.outlook.com (10.118.152.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14 via Frontend Transport; Tue, 24 May 2022 12:12:19 +0000 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01lp2042.outbound.protection.outlook.com [104.47.110.42]) by sydapipop-haraka-inline00.vpc-a3a96cc4.ase2.shn (Haraka/2.8.24) with ESMTPS id 5601211D-7F69-4C4F-914A-A98DEEEB3955.1 envelope-from (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Tue, 24 May 2022 12:12:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WelcC1WuhqASbjJbUiuzCJDDHrRbF/nbozK6Nut+K44gYQZG3eLn51QC/KxTJGommjyQuazvGsGahNVFW3kfg013vuJpa3pGQPf9oOADGDQIJ/EhiEGqfwLLpYNEy01GXgTrIcD9TD4nJ/4Q8Zo1svRq0+lI8xw1fHQwwxyDFoBsSDgQ3LsaKt3nS6JxxMqQcItt7p8MjsqPXJBq6hyVYNIVcuZfrmZX7HYdM4VvbvdPxw9nGwoPu1EEMcoQ4m6TSUht4Q/7EsjTGdlamv+mtWdZ7n0Ld/f0C1ltH03hDktm81v4icMIai1BjrBo5S3hpWGEcE/YywjkRhUO1OXlPQ== 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=P8ppajcoir3jkqKMujNTfWZ2KDDVb9GsAFixmyCZBak=; b=DCFEUFsGIhHJcJGfRyol/1FAmNxZztCrQWcE1VbgORkW+mHNi2Su6n2TZhOoJk6SaIECpHr6jRDrk9AeP2ksAjjvZqd6wNLVOMAjpKySOpa/theFe7jykMfHCjouLvyIUyGQI1c/INizApi/tooV3eI0llaNiG3xSfvDim6Jsef2DIm7+ewd6jXJwpRadMbOtQfTXSJMoDCwrEaeXjQ8bGLBdPXZpfiXyIdU0IMnYkjEiMnvBk7i89qu/PND8rzN4QTX+QUtbTxxdu0ZtpAa8NVN4d1clg/LXWvJTU7yA9qLSO5j5zPUaCkdw20POpwqFUjpQQFhfzdsO7n7pHXGkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=tatacommunications.com; dmarc=pass action=none header.from=tatacommunications.com; dkim=pass header.d=tatacommunications.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tatacommunications.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P8ppajcoir3jkqKMujNTfWZ2KDDVb9GsAFixmyCZBak=; b=MwyyclYCimO3Bc4QWXWUhLifta7ssIFRCC0TVxywDASBlOHjXoxy9mPxFiYGhiCwf51oadhmGvuYy+Vu7qrYUtqhlg+TtJozESMAXtipKCXeNnL+VQhFYVlmYgdH8A2XRf3EnliEB/aCY02sAUgQsSs/sQrXlRSZY905kYLSCAPG//u2JKKoWzf/RkflyZOE4s/C3zb4dRGBRNJY9o4WDyy8JwFXvDYu99IWYlL7zv+5Nn3XzyGIvBIGsErYQIUXH+AjOCWr2wK9WvRCMjkjcg3jxZDFtqG3gu3ms9l1EeJ1bwneMVZACwzNOkCTksZvwMuqYArUba962iDoTHwutg== Received: from PSAPR04MB5516.apcprd04.prod.outlook.com (2603:1096:301:5c::9) by HK0PR04MB3361.apcprd04.prod.outlook.com (2603:1096:203:87::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.18; Tue, 24 May 2022 12:12:13 +0000 Received: from PSAPR04MB5516.apcprd04.prod.outlook.com ([fe80::2820:7577:ede8:f622]) by PSAPR04MB5516.apcprd04.prod.outlook.com ([fe80::2820:7577:ede8:f622%4]) with mapi id 15.20.5273.023; Tue, 24 May 2022 12:12:13 +0000 From: Balakrishnan K To: "Kusztal, ArkadiuszX" , "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++VgACBMowACMLKYAACHjIQAAGYdCQ Date: Tue, 24 May 2022 12:12:12 +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; Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=tatacommunications.com; X-MS-Office365-Filtering-Correlation-Id: 55c37e04-658e-431b-1c0c-08da3d7ea6d3 x-ms-traffictypediagnostic: HK0PR04MB3361:EE_|TYZAPC01FT052:EE_|TYZPR04MB4191:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: kMSLE2UaN4rOT+295MiCZGCMfJPUPfgf2F1lsWcf+bvo1NKgB4c5ShsZr/DCbih41QccKsfvHAgskrMvNOzpgd13VojOQYRYdMJWdTuqR9HZ945cG86+ssqE0iB7ARbhWxZk0OFFSdlDuHjDuyZeOPcuIZ/WhgUn+FUrSEuDJjXR0n7IcM4AkzfclvH2QoectaXrBQ7MJikFRGTXquCAGwOwUbsjfzjR5OP93SIgugJmw67PzdWKBx1AmOrdmnFUJ4cllCQUX6neRMUy+wl/PBsiJ79uUqSJ2joGUIPayQakJSzyLRrLrPlJO966+R96lv8lj3nr5HgFO+EhDiDydQA9baoEL/STor8vkAsZ5ILm68r4iAsxps2p0g/yJj3XAMU3Z/y+BaXZAdVwbqQ3fzZwuEkuPTS2w9XEof4FEnhIf6aT51qm2s3URxvU4hS7rCwwj9CJmED6Hp5JsFeOlKPHbtwyOZtYo9fipN6+JMKu6sIGbbXdOn99JBCzaAHFyo0QQZK70tjx/De1NKzED14l2ANBMl1gKf/JAEaVjczFOK3EH7bgOTdDTLRjO4yI5pegMCIVpXhDBTqPfr9tQcUp+LtZ+E+lihnWXexf5OzbtRGdhceCaVVkRDXry+GsPpQGrp11sPxlhoxzujM9IXRbU7XpFVFfKL0eMkph8LluqJuzrgvaOB+hZivNiYONhVkBZSglCRf8cZzVWdpbWOZvuNTewitxQksPcYrnEYt3g/7SU2mF8lJD+MB+TSsNGj+MV3ZqD9ONR4eBJS/5WAShZKXTb1oS3FrhKVC4JD8= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PSAPR04MB5516.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(38100700002)(110136005)(53546011)(6506007)(33656002)(83380400001)(55016003)(71200400001)(966005)(9686003)(26005)(316002)(7696005)(508600001)(166002)(2906002)(86362001)(76116006)(64756008)(66476007)(66946007)(8676002)(66446008)(66556008)(5660300002)(8936002)(9326002)(52536014)(38070700005)(122000001)(186003); DIR:OUT; SFP:1101; Content-Type: multipart/alternative; boundary="_000_PSAPR04MB5516E3E5173229C956251D1CD6D79PSAPR04MB5516apcp_" MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR04MB3361 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=tatacommunications.com; X-SHN-DLP-SCAN: success X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: TYZAPC01FT052.eop-APC01.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6f991fce-6d5c-460d-d3e6-08da3d7ea2a4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U9+4pRpvB/l0018JDeJ0PbESwR8EfkoE52pT7NqGgKE9s0yVrEJVv6QZKd790yV9TE+tebHK4mw0tQnDF4Tay39UAF13CbjOzRobsdr502VCJzeI+Z6G1EUDuXtBxkNiGjfreFe/gXh+Y6OVaMav5ddlWaeqqAvkbDGRr+KedADnWDzbpsFSs9H/m5XrFgnlQSPD/w5SKHyYEH6bCt7W2fbg1DoUQ04yvG2MIs+6B32P2qS18G2Zn9eNmCfsQggJAzqgf5mYvdPUpHAknfMgB31McQfwVM2QzWmu64NjVSBH+heUO7kt0cFZjmJSXnFRYiG1oPUOqvzhihuNPJRxo5ZKFs48ycX+W4RxSMjBlB4St5YZKJgVJI88ZacIzVT+lo4GaW1Rcmx7uR9lj+G94I8Xgsf4k6M6U8BTnF5NRPJYOWZZE3rWPo05UP7d4FGSn4Zdj7cTvc63n5BIRMaVtzECen1hHO01d2bjMB34eXDTGwEatWhf7ULq79OO7nivnUicQ/DntH5KTiZEC6QrvnI1SEb5mvsqdpJiEqvYsVxvqQ72l9jyeb06FrYlKy3xTMsR1prKooZY7YvMYYpDfqf6teThKztbshQdrrWvIokd37k/LiszJiU4GLeALxCPh5+BSkZJRbOVDV3i5s2au/tNOFSPPQ/oa6PjCibMFkr/NhZ84olYUvAdIWabd/Nu3yuuM4KleHp7yj3w4KZqbI/T7GHs0soQa4usy1ku+pFUyeiQWIN8c9UAGQrlmD49/YFkLjlrvQUL73M8C0kx+A== X-Forefront-Antispam-Report: CIP:52.62.169.21; CTRY:AU; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:sydapipop-haraka-inline00.vpc-a3a96cc4.ase2.shn; PTR:send2.mail-inline.syd-pop.i-shn.net; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(36860700001)(86362001)(9686003)(33656002)(8676002)(966005)(316002)(45080400002)(7696005)(186003)(26005)(336012)(6506007)(83380400001)(53546011)(47076005)(81166007)(508600001)(82310400005)(70206006)(166002)(70586007)(55016003)(2906002)(36906005)(5660300002)(110136005)(52536014)(8936002)(40460700003)(356005)(9326002); DIR:OUT; SFP:1101; X-OriginatorOrg: tatacommunications.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2022 12:12:19.4749 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55c37e04-658e-431b-1c0c-08da3d7ea6d3 X-MS-Exchange-CrossTenant-Id: 20210462-2c5e-4ec8-b3e2-0be950f292ca X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=20210462-2c5e-4ec8-b3e2-0be950f292ca; Ip=[52.62.169.21]; Helo=[sydapipop-haraka-inline00.vpc-a3a96cc4.ase2.shn] X-MS-Exchange-CrossTenant-AuthSource: TYZAPC01FT052.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB4191 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_PSAPR04MB5516E3E5173229C956251D1CD6D79PSAPR04MB5516apcp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Arek, Thanks for the detailed explanation. Regards, Bala From: Kusztal, ArkadiuszX Sent: 24 May 2022 14:44 To: Balakrishnan K ; users@dpdk.org Subject: RE: how to use crypto openssl PMD for asymmetric encryption and de= cryption I should use debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data, asym_op->rsa.cipher.length); to check the encrypted message for the input given? Yes, currently it works this way. The same way output for decryption will b= e placed in asym_op->rsa.message.data and input in asym_op->rsa.cipher.data= . More explanations can be found in rte_crypto_asym.h file https://doc.dpdk.org/api/structrte__crypto__rsa__op__param.html. From: Balakrishnan K > Sent: Tuesday, May 24, 2022 7:24 AM To: Kusztal, ArkadiuszX >; users@dpdk.org Subject: RE: how to use crypto openssl PMD for asymmetric encryption and de= cryption Hi Arek, Thanks for quick response. I am using resulted output vector to verify the encrypted message. I thought the encrypted data will be in the asym_op->rsa.message.data after= rte_cryptodev_enqueue_burst and rte_cryptodev_enqueue_burst call with oper= ation type RTE_CRYPTO_ASYM_OP_ENCRYPT. So ,I checked the hex_dump of asym_op->rsa.message.data. Code snippet: asym_op =3D result_op->asym; debug_hexdump(stdout, "encrypted message", asym_op->rsa.message.data, asym_op->rsa.message.length); Encrypted data will be placed in asym_op->rsa.cipher.data after crypto oper= ation is my understanding is correct ? I should use debug_hexdump(stdout, "encrypted message", asym_op->rsa.cipher.data, asym_op->rsa.cipher.length); to check the encrypted message for the input given? Regards, Bala From: Kusztal, ArkadiuszX > Sent: 23 May 2022 18:15 To: Balakrishnan K >; users@dpdk.org Subject: RE: how to use crypto openssl PMD for asymmetric encryption and de= cryption CAUTION: This email originated from outside of the organization. Do not cli= ck links or open attachments unless you recognize the sender and know the c= ontent is safe. 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_PSAPR04MB5516E3E5173229C956251D1CD6D79PSAPR04MB5516apcp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Arek,

  Thanks for the detailed = explanation.

 

Regards,

Bala

&nbs= p;

From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
Sent: 24 May 2022 14:44
To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>; u= sers@dpdk.org
Subject: RE: how to use crypto openssl PMD for asymmetric encryption= and decryption

 

I should use 
debug_hexdump(stdout, "encrypted message&quo=
t;, asym_op->rsa.cipher.data,
        &=
nbsp;           &nbs=
p; asym_op->rsa.cipher.length);
to check the encrypted message for the input give=
n?

 

Yes, currently it works this wa= y. The same way output for decryption will be placed in asym_op->rsa.mes= sage.data and input in asym_op->rsa.cipher.data.

More explanations can be found = in rte_crypto_asym.h file

https://doc.dpdk.org/api/structrte__crypto__rsa__op__param.html.<= o:p>

 

From: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>
Sent: Tuesday, May 24, 2022 7:24 AM
To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; users@dpdk.org
Subject: RE: how to use crypto openssl PMD for asymmetric encryption= and decryption

 

Hi Arek,

   Thanks for quick r= esponse.

I am using resulted output vect= or to verify the encrypted message.

I thought the encrypted data will be in the asym_op-&g=
t;rsa.message.data after rte_cryptodev_enqueue_burst and rte_cryptodev_enqu=
eue_burst call with operation type RTE_CRYPTO_ASYM_OP_ENCRYPT.
So ,I checked the hex_dump of asym_op->rsa.message.=
data.
 
Code snippet:
asym_op =3D result_op->asym;=
debug_hexdump(stdout, "encrypted message&quo=
t;, asym_op->rsa.message.data,
        &=
nbsp;           &nbs=
p; asym_op->rsa.message.length);
 
 
 
Enc=
rypted data will be placed in asym_op->rsa.c=
ipher.data after crypto operation is my understanding is correct ?
I should use 
debug_hexdump(stdout, "encrypted message&quo=
t;, asym_op->rsa.cipher.data,
        &=
nbsp;           &nbs=
p; asym_op->rsa.cipher.length);
to check the encrypted message for the input give=
n?
 
 
Regards,
Bala 
 

 

From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
Sent: 23 May 2022 18:15
To: Balakrishnan K <Balakrishnan.K1@tatacommunications.com>; users@dpdk.org
Subject: RE: how to use crypto openssl PMD for asymmetric encryption= and decryption

 

CAUTION: This email originated from outside of the organization. = Do not click links or open attachments unless you recognize the sender and know the content is safe. <= /p>

Hi Bala,

 

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

Although there is a bug in debu= g_hexdump in this function which may cause this confusion.

 

Plus, the test you are referrin= g is PWCT test (Pairwise conditional test) -> it will encrypt, then decr= ypt.

Please take a look into this co= mment in queue_ops_rsa_enc_dec function:

/* Use the resulted output as d= ecryption Input vector*

So above this line there is an = encryption part.

Below is decryption.  = ;        

 

Regards,

Arek

 

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

 

Hi All,

   I am new to dpdk. = Planning to use openssl crypto PMD for encrypting/decrypting  the pack= ets.

Couldn’t find much docume= nts on openssl PMD for asymmetric encryption/decryption.

Any one please point me in the = right document.

 

I have tried to run the test ca= ses wrote for asymmetric crypto using openssl virtual PMD.

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

 

File : app/test/test_cryptodev_= asym.c

Test executable: ./app/test/dpd= k-test

Test case : test_rsa_enc_dec

    <= /span>

Input given to encryption:&n= bsp;            &nbs= p;

message at [0x1894e60], len=3D2= 0

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

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

 

After processing the output = also looks like same :

encrypted message exist at [0x1= 894e60], 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_PSAPR04MB5516E3E5173229C956251D1CD6D79PSAPR04MB5516apcp_--