From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 64AB85F2C for ; Sun, 17 Jun 2018 21:31:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2018 12:31:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,236,1526367600"; d="scan'208";a="59969449" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga003.jf.intel.com with ESMTP; 17 Jun 2018 12:31:27 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX102.ger.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Sun, 17 Jun 2018 20:31:27 +0100 From: "De Lara Guarch, Pablo" To: "Verma, Shally" CC: "Trahe, Fiona" , "akhil.goyal@nxp.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Sahu, Sunila" , "Gupta, Ashish" Thread-Topic: [PATCH v3 4/6] test/crypto: add unit testcase for asym crypto Thread-Index: AQHT7NwQZXgFaOIsBkSV4DQ2rgKI06RklDyAgAAZTgCAAFsGoA== Date: Sun, 17 Jun 2018 19:31:26 +0000 Message-ID: References: <1526450713-17299-1-git-send-email-shally.verma@caviumnetworks.com> <1526450713-17299-5-git-send-email-shally.verma@caviumnetworks.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjExMDZkMDYtYjM1Mi00MDc2LWJjOWYtMzdiYzdlMDAzMDg0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiM2FvQmxGV2IycnhmcjF4bFgrSnVVemhLT1UwNW1aeGxJVFZ3cldGcXBwY1Y4ZTVyT1wvM3FNbXdQRk84N0NqQ1YifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/6] test/crypto: add unit testcase for asym 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: , X-List-Received-Date: Sun, 17 Jun 2018 19:31:33 -0000 > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Sunday, June 17, 2018 4:01 PM > To: De Lara Guarch, Pablo > Cc: Trahe, Fiona ; akhil.goyal@nxp.com; > dev@dpdk.org; Athreya, Narayana Prasad > ; Sahu, Sunila > ; Gupta, Ashish > Subject: RE: [PATCH v3 4/6] test/crypto: add unit testcase for asym crypt= o >=20 > Hi Pablo >=20 > >-----Original Message----- > >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com] > >Sent: 17 June 2018 18:23 > >To: Verma, Shally > >Cc: Trahe, Fiona ; akhil.goyal@nxp.com; > >dev@dpdk.org; Athreya, Narayana Prasad > >; Sahu, Sunila > >; Gupta, Ashish > >Subject: RE: [PATCH v3 4/6] test/crypto: add unit testcase for asym > >crypto > > > >External Email > > > >Hi Shally, > > > >> -----Original Message----- > >> From: Shally Verma [mailto:shally.verma@caviumnetworks.com] > >> Sent: Wednesday, May 16, 2018 7:05 AM > >> To: De Lara Guarch, Pablo > >> Cc: Trahe, Fiona ; akhil.goyal@nxp.com; > >> dev@dpdk.org; pathreya@caviumnetworks.com; Sunila Sahu > >> ; Ashish Gupta > >> > >> Subject: [PATCH v3 4/6] test/crypto: add unit testcase for asym > >> crypto > >> > >> Add unit test case to test openssl PMD asym crypto operations. Test > >> case invoke asymmetric operation on DPDK Openssl PMD and cross-verify > >> results via Openssl SW library. > >> Tests have been verified with openssl 1.0.2m release. > > > >Is it possible to run these tests without using an external library to > >verify the results, like what we do with symmetric crypto? Having known > answers in the test vectors? > >I am not familiar with asymmetric, that's why I am asking. > > > [Shally] I prefer to have it cross verified using an independent library = module, > that's the reason I kept design that way. >=20 > >Also, you are adding asymmetric support for OpenSSL PMD in the 5th > >patch, So this test won't work until then. > >I think it is better to change the other between patch 4 and 5. > [Shally] Ok >=20 > > > >> >=20 > //snip >=20 > >> > >> -LDLIBS +=3D -lm > >> +LDLIBS +=3D -lm -lcrypto > > > >If openssl libcrypto is actually required, I would add a check similar > >to the one just below, with compressdev, to add "-lcrypto", so users > >can run the test app without this, if they don't want to test asymmetric= . > > > >> ifeq ($(CONFIG_RTE_COMPRESSDEV_TEST),y) > >> ifeq ($(CONFIG_RTE_LIBRTE_COMPRESSDEV),y) > >> LDLIBS +=3D -lz > > > [Shally] You mean add another config option for Asymmetric test? At least check for CRYPTODEV, but since this is enabled by default, I think we need an RTE_CRYPTODEV_ASYM_TEST flag. >=20 > >.. > > >=20 > //snip >=20 > >> +#include > >> +#include > >> +#include > >> +#include > > > >Move this to the top of the file (as it is an external library to DPDK). > > > [Shally] Ok >=20 > >> + > >> +#include "test.h" > >> +#include "test_cryptodev.h" > > > >... > > > >> +/** rsa xform using exponent key */ > >> +struct rte_crypto_asym_xform rsa_xform =3D { > >> + .next =3D NULL, > >> + .xform_type =3D RTE_CRYPTO_ASYM_XFORM_RSA, > >> + .rsa =3D { > >> + .n =3D { > >> + .data =3D > >> + (uint8_t *) > >> + > > > >For better consistency, could you use the format used above (0x00, 0xB3, > 0xA1...)? > > > >> ("\x00\xb3\xa1\xaf\xb7\x13\x08\x00\x0a\x35\xdc\x2b\x20\x8d" > [Shally] Ok. >=20 > > > >... > > > >> +#pragma GCC diagnostic pop > >> + > >> +static int > >> +test_rsa(struct rsa_test_data *t) > > > >... > > > >> + rsa->n =3D > >> + BN_bin2bn( > >> + (const unsigned char *)rsa_xform.rsa.n.data, > >> + rsa_xform.rsa.n.length, > >> + rsa->n); > > > >I am getting a compilation error: > > > >/test/test/test_cryptodev_asym.c:322:5: error: > >dereferencing pointer to incomplete type 'RSA {aka struct rsa_st}' > > rsa->n =3D > > ^~ > > > >My OpenSSL version is 1.1.0h. > > > [Shally] This library is tested with version 1.0.2m (mentioned above) and= also > one supported by openssl PMD . So, you need to take similar version. I'd say we should support the latest stable version of OpenSSL. Could you get the latest 1.1.0? Thanks, Pablo