Hi Damian, Fiona, Arek

Though am bit late to come back to this. But I have question on mod_exp test 
vector.
Please see below.

> -----Original Message-----
> From: dev <dev-boun...@dpdk.org> On Behalf Of Damian Nowak
> Sent: Wednesday, March 27, 2019 3:15 PM
> To: dev@dpdk.org
> Cc: fiona.tr...@intel.com; arkadiuszx.kusz...@intel.com; Damian Nowak
> <damianx.no...@intel.com>
> Subject: [dpdk-dev] [PATCH v5 1/1] test: new test structure for asymmetric
> crypto
> 
> This patch adds new test structure for modexp
> and modinv for asymmetric cryptography
> 
> Signed-off-by: Damian Nowak <damianx.no...@intel.com>
> ---
>  app/test/test_cryptodev.h                  |   1 +
>  app/test/test_cryptodev_asym.c             | 318 ++++++++++
>  app/test/test_cryptodev_mod_test_vectors.h | 967
> +++++++++++++++++++++++++++++
>  3 files changed, 1286 insertions(+)
> 
...

>  REGISTER_TEST_COMMAND(cryptodev_openssl_asym_autotest,
>                                         test_cryptodev_openssl_asym);
> +
> +REGISTER_TEST_COMMAND(cryptodev_qat_asym_autotest,
> test_cryptodev_qat_asym);
> diff --git a/app/test/test_cryptodev_mod_test_vectors.h
> b/app/test/test_cryptodev_mod_test_vectors.h
> index a25c676..c66f4b1 100644
> --- a/app/test/test_cryptodev_mod_test_vectors.h
> +++ b/app/test/test_cryptodev_mod_test_vectors.h
> @@ -1,10 +1,977 @@
>  /* SPDX-License-Identifier: BSD-3-Clause
>   * Copyright(c) 2018 Cavium Networks
> + * Copyright (c) 2019 Intel Corporation
>   */
> 
>  #ifndef TEST_CRYPTODEV_MOD_TEST_VECTORS_H_
>  #define TEST_CRYPTODEV_MOD_TEST_VECTORS_H_
> 
> +#define DATA_SIZE 512
> +
...

> +static const struct
> +modex_test_data modex_test_case[] = {
> +{
> +     .description = "Modular Exponentiation "
> +                                "(mod=128, base=20, exp=3, res=128)",
> +     .xform_type = RTE_CRYPTO_ASYM_XFORM_MODEX,
...
> +     .modulus = {
> +             .data = {
> +                     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?

> +                     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 = 128
> +     },
> +     .result_len = 128
> +},
....
>  /* modular operation test data */
>  uint8_t base[] = {
>       0xF8, 0xBA, 0x1A, 0x55, 0xD0, 0x2F, 0x85,
> --
> 2.7.4

Reply via email to