From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E58C5A046B for ; Fri, 26 Jul 2019 07:29:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C03341C3CD; Fri, 26 Jul 2019 07:29:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 7874B1C3BA for ; Fri, 26 Jul 2019 07:29:33 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6Q5TWqt030634; Thu, 25 Jul 2019 22:29:32 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=nHYa/x15nEoIJfkddl5kQxaw8H0RggrmRYgmHsu1+8w=; b=uIOfM17r4FwxBIXm3vqZiThgZjcXP06hm0Nm0btJgYW5P9HVFOlrFuadeVg5qSFWoqhW 0W/tgeBZ6ozxn7mil9OdaPSv44hC8ZjsdUVBX/r/5xcZ8PZqi8/Q+5Om5s1M6G6NdgN1 ypGkNyWk3LQOx4j6/ChqmMcLmKT29L8oXIvjmkZ3y0xYHWPIaVp1D3j3EaL31WiCgrcM WdP0eNHKfovSx4UEMkbxcXBYTtVeNoIOHdlHteahlZIQTUIIPVJQY2XkRd1Nv/bkwVrx hv2cKybmTjURGmqqXvmQotAXUZTgs4UiYzyWv4LVBI5FaKl0nQ6/VeGqOjsgeqCmhCro gg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2tx61rna0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 22:29:32 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 25 Jul 2019 22:29:31 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.57) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 25 Jul 2019 22:29:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gGvu/h+A9pkp2XhXyxY96m73gndnpVn8Tm/Wnf30pM9SYTr8NfHOjYBcNFtaFrp19tlhn690ZeTyIPDLhPQBdAwQvCfJDlkM2mdjNk5DirIjIhOpxZ2MXXgF0FpRJlIcf8k4h8DX6VlvJ7B7eg6T63g9MIQDmgWXCcac8j53xl2Pgt2jwqBZ8+0vhbTBYIGamhAMJ7QH6LNs9eynvY6Uad8rulIs2METOYBc4yqpP49/wM0MnCIYp2EzXg05Wp+eHXEDULkqVGEUB8+riMOqGYMh0If6flbaH+X27nClxE7nvmUeC8kMJzNljYYSUuprMG1tNXNOk+oeSVylR2TPGA== 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-SenderADCheck; bh=nHYa/x15nEoIJfkddl5kQxaw8H0RggrmRYgmHsu1+8w=; b=KZtFn7WGsKmrBYO+ulDqoCml3qrzfhYiIP9H650vJfqpUxWPsSD0TDAa2lZH+j+QI205ADyXKY60M9BtQQVWkMnp5wefkvcV+qJTm5w3Xljt4u3dfr9iKzH8upOrh3yaEJg7N668SYFtDfVgZkcadTE5nQ1uOeORxY0adN8Vv3c/5udUjtZ+zFWOwzZuM0ZcClIQgms1IWXEa5qkRz850MKfI4ORdu2cNkzeOnXeV9AG58/Iq4nBIxw34miGXQ5VaITrswVrhRR6zSadlAZNirY42PoPr47wJZs3CXeJymL0QrLHpxhPH+9UfYPVVgRns5kHdY33qtLeoyUYYAXvzQ== 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=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nHYa/x15nEoIJfkddl5kQxaw8H0RggrmRYgmHsu1+8w=; b=Gx7/NimSm36B74fSC3asfpASwrhRdcNoasWwudxcMbrPMc/r7A3ZC/QDamutd+SHCu5kcSye54KXF20Y7+z21KaGqwBBX+Ql8XTYRyV2/ssOZQW48gxJmrTTPg0Ath2DDvOOV48M88LsK3U6vzrrmgXhHL6qm4OF9oVFUC6kWZ8= Received: from BN6PR1801MB2052.namprd18.prod.outlook.com (10.161.157.11) by BN6PR1801MB2051.namprd18.prod.outlook.com (10.161.156.39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Fri, 26 Jul 2019 05:29:29 +0000 Received: from BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72]) by BN6PR1801MB2052.namprd18.prod.outlook.com ([fe80::b9c4:1fd1:a47e:cd72%6]) with mapi id 15.20.2094.017; Fri, 26 Jul 2019 05:29:29 +0000 From: Shally Verma To: "Kusztal, ArkadiuszX" , "Nowak, DamianX" , "dev@dpdk.org" CC: "Trahe, Fiona" , Ayuj Verma , Sunila Sahu , Kanaka Durga Kotamarthy , Anoob Joseph , "Narayana Prasad Raju Athreya" Thread-Topic: [dpdk-dev] [PATCH v5 1/1] test: new test structure for asymmetric crypto Thread-Index: AQHU5IKFVp7P4HphXkK8vll685vq76bbkpHggAApGCCAAA1c8IAABSkAgAB6QkCAABCpYIAAw1lg Date: Fri, 26 Jul 2019 05:29:29 +0000 Message-ID: References: <20190326141549.16125-1-damianx.nowak@intel.com> <20190327094521.16414-1-damianx.nowak@intel.com> <20190327094521.16414-2-damianx.nowak@intel.com> <06EE24DD0B19E248B53F6DC8657831551B282BC2@hasmsx109.ger.corp.intel.com> <06EE24DD0B19E248B53F6DC8657831551B282C78@hasmsx109.ger.corp.intel.com> <06EE24DD0B19E248B53F6DC8657831551B282F46@hasmsx109.ger.corp.intel.com> In-Reply-To: <06EE24DD0B19E248B53F6DC8657831551B282F46@hasmsx109.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2410110f-ad87-4378-6cfd-08d7118a3b88 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BN6PR1801MB2051; x-ms-traffictypediagnostic: BN6PR1801MB2051: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01106E96F6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(346002)(366004)(376002)(136003)(396003)(43544003)(13464003)(199004)(189003)(14454004)(4326008)(66946007)(5660300002)(66476007)(25786009)(6246003)(229853002)(26005)(53546011)(64756008)(486006)(107886003)(52536014)(76116006)(66556008)(55016002)(55236004)(256004)(81156014)(478600001)(14444005)(6436002)(9686003)(66446008)(6506007)(74316002)(7696005)(76176011)(186003)(8936002)(102836004)(2501003)(68736007)(71190400001)(3846002)(54906003)(110136005)(2906002)(476003)(446003)(11346002)(66066001)(7736002)(53936002)(86362001)(33656002)(71200400001)(99286004)(81166006)(305945005)(316002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR1801MB2051; H:BN6PR1801MB2052.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Y6tkE3gxi5QqSy04nyZ01r423NoMtb3ehktT+B2bmFFxPI89OzjU3i+uh7w+bu7mY4M2aGR1O16w8eC5/7V5CNB0RCIShky4kwmx85LZJLBVmPN62NUKhBP6/7o05XJ91spHL5GLUhH5ModeEk6abg8p83FVBaXZnutIap629FZ5ExGesbPeiBgwNbS2M2/JITe6sT9L+xqWpXP7HpwmganbkaNBxS2jIw6VrX+82+f1cOBEGKpDX9FYTtos+lGr9RVxlEfhLt5WPxYk4PDcfJ/5xJ7xno5+UIprWq1jHQ2hBkAITW+f4GjG3YOq5iWiEe6PQYIX6pEx9DiRvqtA+I8ruI3f9tY2u86ATXwWPE63v2vkOaUq44vnRPXhJWERct71M28cwQCCGrtFcxY1CA/C+v/69k0H/hhiUlbpo9s= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2410110f-ad87-4378-6cfd-08d7118a3b88 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2019 05:29:29.6910 (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: shallyv@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1801MB2051 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-26_03:2019-07-26,2019-07-26 signatures=0 Subject: Re: [dpdk-dev] [PATCH v5 1/1] test: new test structure for asymmetric crypto X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Kusztal, ArkadiuszX > Sent: Thursday, July 25, 2019 11:22 PM > To: Shally Verma ; Nowak, DamianX > ; dev@dpdk.org > Cc: Trahe, Fiona ; Ayuj Verma > ; Sunila Sahu ; Kanaka Durga > Kotamarthy ; Anoob Joseph > ; Narayana Prasad Raju Athreya > > Subject: RE: [dpdk-dev] [PATCH v5 1/1] test: new test structure for > asymmetric crypto >=20 >=20 >=20 ... > > > > > > > +static const struct > > > > > > > +modex_test_data modex_test_case[] =3D { { > > > > > > > + .description =3D "Modular Exponentiation " > > > > > > > + "(mod=3D128, base=3D20, exp=3D3, > > > res=3D128)", > > > > > > > + .xform_type =3D RTE_CRYPTO_ASYM_XFORM_MODEX, > > > > > > ... > > > > > > > + .modulus =3D { > > > > > > > + .data =3D { > > > > > > > + 0xb3, 0xa1, 0xaf, 0xb7, 0x13, 0x08, 0x00, > > 0x0a, > > > > > > There's already a testvector mod_p[] in file with leading 0. > > > > > > Where as I see this one duplicate of that but without leading 0= . > > > > > > Could you tell me if you ever tested with mod_p[] with leading > > > > > > 0 and if your qat PMD passed that? > > > > > > > > > > [AK] - Hi Shally, > > > > > The problem with this vector is that it has 1024bit long number > > > > > but > > > > > sizeof(mod_p) Is 129 bytes (1032 bit). > > > > > It is no problem for QAT to get correct result, but test will > > > > > fail because QAT PMD will return 129 bytes of date (with leading > > > > > zero, number right-shifted) so comparison will fail. This is the > > > > > same question as > > > > padding NONE for RSA. > > > > > Should we trim zeroes, or shouldn't we. > > > > [Shally] Ya. Now, I correlate changes that you proposed to another > > > > RSA xform patch. Because Spec simply expect Key input as positive > > > > integer and does not know if its DER formatted input. > > > > > > > > So, I have one question here: How QAT is handling leading 0? Do > > > > you pass data as is to HW with 0 in it and it is still able to > > > > produce correct result for you? > > > [AK] - We pass as is (with 0), it will still produce correct result > > > (4096 bits are size upper limit for QAT currently). So there may be > > > any number of leading zeroes up to 512bytes, and we don't care. > > > Right now there are discrepancies between OPENSSL and QAT in that as > > > QAT will return shifted data and OPENSSL will not, we need to choose > > > one way > > or other. > > [Shally] "shifted data" mean? Can you help clarify with some example > here? > Sure. Let use aforementioned vector in test_mod_exp. Size of result is eq= ual > to sizeof(mod_p) so 129 bytes but number is 128 bytes long. So result[0] = =3D 0, > result[1] =3D 0x2C, result[128] =3D 0x5A. >=20 [Shally] Okay, you mean QAT HW returns o/p with pre-appended 0s but openssl= doesn't . Is that right? Thanks Shally > > > > > > > > Or, you take care in PMD to remove it and then append it back later > > > at > > > > o/p? > > > > In case, you pass to HW, then does all bytes after 0 store correct = o/p? > > > > > > > > > > > > > > > > > + 0x35, 0xdc, 0x2b, 0x20, 0x8d, 0xa1, 0xb5, > > > 0xce, > > > > > > > + 0x47, 0x8a, 0xc3, 0x80, 0xf4, 0x7d, 0x4a, > > 0xa2, > > > > > > > + 0x62, 0xfd, 0x61, 0x7f, 0xb5, 0xa8, 0xde, > > 0x0a, > > > > > > > + 0x17, 0x97, 0xa0, 0xbf, 0xdf, 0x56, 0x5a, > > 0x3d, > > > > > > > + 0x51, 0x56, 0x4f, 0x70, 0x70, 0x3f, 0x63, > > 0x6a, > > > > > > > + 0x44, 0x5b, 0xad, 0x84, 0x0d, 0x3f, 0x27, > > > 0x6e, > > > > > > > + 0x3b, 0x34, 0x91, 0x60, 0x14, 0xb9, 0xaa, > > > 0x72, > > > > > > > + 0xfd, 0xa3, 0x64, 0xd2, 0x03, 0xa7, 0x53, > > 0x87, > > > > > > > + 0x9e, 0x88, 0x0b, 0xc1, 0x14, 0x93, 0x1a, > > 0x62, > > > > > > > + 0xff, 0xb1, 0x5d, 0x74, 0xcd, 0x59, 0x63, > > 0x18, > > > > > > > + 0x11, 0x3d, 0x4f, 0xba, 0x75, 0xd4, 0x33, > > > 0x4e, > > > > > > > + 0x23, 0x6b, 0x7b, 0x57, 0x44, 0xe1, 0xd3, > > > 0x03, > > > > > > > + 0x13, 0xa6, 0xf0, 0x8b, 0x60, 0xb0, 0x9e, > > > 0xee, > > > > > > > + 0x75, 0x08, 0x9d, 0x71, 0x63, 0x13, 0xcb, > > 0xa6, > > > > > > > + 0x81, 0x92, 0x14, 0x03, 0x22, 0x2d, 0xde, > > 0x55 > > > > > > > + }, > > > > > > > + .len =3D 128 > > > > > > > + }, > > > > > > > + .result_len =3D 128 > > > > > > > +}, > > > > > > .... > > > > > > > /* modular operation test data */ uint8_t base[] =3D { > > > > > > > 0xF8, 0xBA, 0x1A, 0x55, 0xD0, 0x2F, 0x85, > > > > > > > -- > > > > > > > 2.7.4