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 4275CA0548; Wed, 25 May 2022 08:02:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25A05400EF; Wed, 25 May 2022 08:02:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 99A5B400D6 for ; Wed, 25 May 2022 08:02:56 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24OK8Npe020584; Tue, 24 May 2022 23:02:56 -0700 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2108.outbound.protection.outlook.com [104.47.58.108]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3g93ty2cpc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 May 2022 23:02:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZVwuCYNNYAlK8vnfdlcvP25ZdO9Avf7KKgx5o5sHO+jm/HNvd0BhLGTCvL8aT5OLzejhwGF0FHk+0xASKhT1zPh5CjxyemzQWFJwL5xW7v6sm9pCWYVHWjomczFVJ4lBuUWTJVTXCfzPujeQIVneup1EjP/cPpgGVtGcd+Yy/AEgu61rQ6jr6ITWOWLo8UaLbMtSVpF1cpeM++kFMsHJjHL5rWXIc8FexZWkLNUtsgOdWHk545iFXaOWs3LmpDDQGIQAlbC1aYUwjdd+BQPh3rlJewOdcs9bMwyEbMctwha/eaHYa9wsVn6zUswlJYxwDGpg1BkJ8sC+0hHVIrEQfg== 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=Hlq9ubWYvQ3rMjYXDvep8vyQundq04RUn0tdHs3uSA4=; b=R7qTLlTKJ5LdA8UhN4GNZaVAxWURSrsC9z5/XDnD3ZAf/57QruZNwlGRGlCOXZWXTd4A5xNYxXnpVLt/uulusHQE5E23iFLAtAmylVxtxVwoegNtRhsCXugH5AkSh9JR5poYlDRDJnQxHHkkzEyGc9bg8kd0okpUM+xQrNJpZghCf0C1za5aZBVyx7YlGtalUrg18CkV1mjaNX/P1+c9F/BVwktIKo2uBm4ietMoZpvT4usZcFor8osa7NaUnKxKFSh6rUBAY5WJrN0SMWqo6ATEhBVOvNLVjhRU3OqyCvUpHZOleOiRbf4Z00qHx48B0tLDrtF2iM8Rt5+KZplvpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hlq9ubWYvQ3rMjYXDvep8vyQundq04RUn0tdHs3uSA4=; b=GguU02g/+P+PhCL/8tXz7PS0uQ+jBgcvQmJuDFJijZu5QnJ3gMzw+hF/8h1iQEOB6AHarHkxISU6CMroi+jHHjw3CCpT7sr46IQHZ3GuQqG0ZASdFCHohIYeSKFdEZP6J427IpbWykruX1M/mz4OuJD0/TI1PZthv2QznbaqoYQ= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BYAPR18MB2568.namprd18.prod.outlook.com (2603:10b6:a03:137::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23; Wed, 25 May 2022 06:02:49 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::f154:453d:893:f6ce%7]) with mapi id 15.20.5293.013; Wed, 25 May 2022 06:02:49 +0000 From: Akhil Goyal To: "Kusztal, ArkadiuszX" , "dev@dpdk.org" CC: Anoob Joseph , "Zhang, Roy Fan" Subject: RE: [EXT] [PATCH 20/40] cryptodev: add elliptic curve diffie hellman Thread-Topic: [EXT] [PATCH 20/40] cryptodev: add elliptic curve diffie hellman Thread-Index: AQHYbBey3IhHvQ40CEuYISM+aZVaF60t8kcQgAAxLgCAAAD8gIAA/QLQ Date: Wed, 25 May 2022 06:02:49 +0000 Message-ID: References: <20220520055445.40063-1-arkadiuszx.kusztal@intel.com> <20220520055445.40063-21-arkadiuszx.kusztal@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2f72a1c9-8a9b-4d7f-5a6e-08da3e1432bc x-ms-traffictypediagnostic: BYAPR18MB2568: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: kY4a5Ka3jju9wwY8+K3rUQzLsh/87q5gfJH+eJdWDK/ScCG5l/0vThN4IgQo5Q3h5WHqE1YAeGkq3SZVyGg7rjEW+MGZ/8SPTAnrugKvpC3ET0emIpaR8Mj37ynqI2XgA+RFvk2lrXbcBtxDPM/aKeyzrYe22oIoApltUzJGBwT3KdCwcrLFWvUwSMMtovO4S8EwOSphMXCVza4IXao9XA25ao510JOIaHOBx/5R+rl1ll9lgpRQYNV4tgS5PulcDTzkkOZdV7L9ia5h+uAiYVvVxkThNq5T59w4JyLwM1qX4OuvFuO7hR1ybWLAPOtlwNy1q65r+BXNsfbi8/PrjN6GW+/ZNX2rntse8MFp2Cj3djQX6q9eGoQGFC1FZ7ntNQU6l7qsZN5fT8QAGvHkPSZZ0MB1M619IBZuRJz2kU6JNv6xT2aKSefJ6l+npx8N+SDJo0aKdvjtrsfHMpKPK3jnJ1Jx5/HkwuwhkoC/i3WxwXQEs0Mq5nfBDPA4qEXAif5efeFfxQZXqP6jVUtzGpU1hksOPxlAn5EU8meA21Y5bplrBoGPcPT1XR2qMk4jtIZAHhgDqHuFWS9lA2MiGFoLaBPZfYpzqMcsT0IEwVxw/U+8ZpiamMXkJNP+ANmq8wm42eiQehHFvDNPmroHASVly94O0bGwinOLsVHzYIsLQnnByfWuWAIfvu6PqnVECTW2JmK3CkCe3a5o2nURYQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(66476007)(71200400001)(7696005)(8676002)(4326008)(38070700005)(2906002)(64756008)(66446008)(8936002)(38100700002)(55236004)(55016003)(33656002)(6506007)(122000001)(52536014)(5660300002)(26005)(54906003)(316002)(83380400001)(508600001)(110136005)(186003)(9686003)(86362001)(66556008)(76116006)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?LN4zDaucFgJfNXny6TGX/nx8if3yc0i8Q3tO7sHST6vTXSzkPSKZDdvO82Cx?= =?us-ascii?Q?7Wgrp5I83S/ZLN4W7FWoBQ6+gMPWp1stgNAWgW9esV8ce+GsLXLmtaQfr15J?= =?us-ascii?Q?oyOvc79W8io0gRRfJFE+VYsn1PGjYdSFvzHG0kjskQ1ld/vU9vZBqIicAr1M?= =?us-ascii?Q?vbOBKp/xGRH5kx3Rt96KiTqweDQVsiL0ryECX+YrpgeXaKtM0sdsi35j2ni2?= =?us-ascii?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dQ/Ei8+vBhJpv9E?= =?us-ascii?Q?2w9/15iQ0VMPNfufJVhzwOlR9hMAbQn3SYVKvhDTK8dH62F/zjO0SKleIyfd?= =?us-ascii?Q?1LZtXaU164CMYxfMxbTagfVrRESbdCR4NJLX2cJrML1GY/1N12fXww8hkhBv?= =?us-ascii?Q?E45SRh7b/SooxX2T60Wx6IUxvIXsH4k2zUt2rpfAQzUHoTKBGzlNYCIvKYy7?= =?us-ascii?Q?kqBIt4QKZmvLx711Y4kJ2vdEMqZptQqSq11R6Snk/ZWHS+Nk20QCgXxSNB3k?= =?us-ascii?Q?Gh7BWki8XTeuuoqkGoRxfL9HOvbNtDS/lhJEy/H47z61h61TwmAvyfbdh38N?= =?us-ascii?Q?IhDuWjNpOlbPn3bZIqKWlEm9oB8MzSmEzOgyHa/tdSvRABZQfkxyLUc1VzSY?= =?us-ascii?Q?LFNKR3g7+2WUjMcgDy0q/NowCoSKaQ7m+W8dgWaXh+1UOvpVl1FY9PbS8o9T?= =?us-ascii?Q?zl4mve879Z/ZDsV1FpPlHRp5lRWdZuoeMsmHV7a6RpfK6NCOiz/gwDSkXKK1?= =?us-ascii?Q?jWuP/wEoZ+lUTLgz4Jk7UybjoA8wLSnt0C7hKn6txBqx059grgfp/1wT7bFb?= =?us-ascii?Q?Rg+wbKjmry/31pOnQk4qzXcx03wlesiKXG6lpSHyBEai+wxU+1TQKHZDk9K3?= =?us-ascii?Q?0KGJaC1c0w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f72a1c9-8a9b-4d7f-5a6e-08da3e1432bc X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2022 06:02:49.7194 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FWsmxptSD8Fdhx3O9V1zwOgrL3yMi9jjRfvXR9sdd4VydEaAIK+yvSBLbTdFnhHCmucFlT1pBQIkO/iYVXNXYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2568 X-Proofpoint-GUID: 2p6YWXF7LbnhkG-PwcQszzNESzwEOmKA X-Proofpoint-ORIG-GUID: 2p6YWXF7LbnhkG-PwcQszzNESzwEOmKA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-25_02,2022-05-23_01,2022-02-23_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 > > > > /** > > > > @@ -383,22 +385,28 @@ struct rte_crypto_dh_op_param { > > > > /**< > > > > * Output generated private key when op_type is > > > > * DH PRIVATE_KEY_GENERATION > > > > > > Update with actual enum name for this as well > > > > > > > - * Input when op_type is DH SHARED_SECRET_COMPUTATION. > > > > - * > > > > + * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > > > > */ > > > > - rte_crypto_uint pub_key; > > > > + union { > > > > + rte_crypto_uint pub_key; > > > > + struct rte_crypto_ec_point pub_point; > > > > + }; > > > > /**< > > > > - * Output generated public key when op_type is > > > > - * DH PUB_KEY_GENERATION. > > > > - * Input peer public key when op_type is DH > > > > - * SHARED_SECRET_COMPUTATION > > > > - * > > > > + * Diffie-Hellman public part > > > > + * For DH it is big-endian unsigned integer. > > > > + * For ECDH it is a point on the curve. > > > > + * Output for RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE > > > > + * Input for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > > > > */ > > > > - rte_crypto_uint shared_secret; > > > > + union { > > > > + rte_crypto_uint shared_secret; > > > > + struct rte_crypto_ec_point shared_point; > > > > + }; > > > > /**< > > > > - * Output with calculated shared secret > > > > - * when op type is SHARED_SECRET_COMPUTATION. > > > > - * > > > > + * Diffie-Hellman shared secret > > > > + * For DH it is big-endian unsigned integer. > > > > + * For ECDH it is a point on the curve. > > > > + * Output for RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE > > > > */ > > > > > > Is it output for others as well? > > [Arek] - No, it is output for phase2 only. > [Arek] - additionally there is still an option to split it into DH_PARAM, > ECDH_PARAM, x25519. For secp and Edwards/Montgomery it should be ok with > current approach but for SM2 we may need new struct. I believe we need better documentation for asymmetric cryptography.