Hi Pablo

>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:[email protected]]
>Sent: 17 June 2018 18:23
>To: Verma, Shally <[email protected]>
>Cc: Trahe, Fiona <[email protected]>; [email protected]; [email protected]; 
>Athreya, Narayana Prasad
><[email protected]>; Sahu, Sunila <[email protected]>; 
>Gupta, Ashish <[email protected]>
>Subject: RE: [PATCH v3 4/6] test/crypto: add unit testcase for asym crypto
>
>External Email
>
>Hi Shally,
>
>> -----Original Message-----
>> From: Shally Verma [mailto:[email protected]]
>> Sent: Wednesday, May 16, 2018 7:05 AM
>> To: De Lara Guarch, Pablo <[email protected]>
>> Cc: Trahe, Fiona <[email protected]>; [email protected];
>> [email protected]; [email protected]; Sunila Sahu
>> <[email protected]>; Ashish Gupta
>> <[email protected]>
>> 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.

>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

>
>>

//snip

>>
>> -LDLIBS += -lm
>> +LDLIBS += -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 += -lz
>
[Shally] You mean add another config option for Asymmetric test?

>..
>

//snip

>> +#include <rte_crypto.h>
>> +#include <rte_cryptodev.h>
>> +#include <rte_cryptodev_pmd.h>
>> +#include <openssl/ssl.h>
>
>Move this to the top of the file (as it is an external library to DPDK).
>
[Shally] Ok

>> +
>> +#include "test.h"
>> +#include "test_cryptodev.h"
>
>...
>
>> +/** rsa xform using exponent key */
>> +struct rte_crypto_asym_xform rsa_xform = {
>> +     .next = NULL,
>> +     .xform_type = RTE_CRYPTO_ASYM_XFORM_RSA,
>> +     .rsa = {
>> +             .n = {
>> +             .data =
>> +             (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. 

>
>...
>
>> +#pragma GCC diagnostic pop
>> +
>> +static int
>> +test_rsa(struct rsa_test_data *t)
>
>...
>
>> +     rsa->n =
>> +             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 =
>     ^~
>
>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.

Thanks for review.
Shally

>Thanks,
>Pablo

Reply via email to