From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 54CF01ECBA for ; Wed, 13 Jun 2018 18:15:42 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 09:15:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,219,1526367600"; d="scan'208";a="47478468" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga008.fm.intel.com with ESMTP; 13 Jun 2018 09:15:40 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.148]) by IRSMSX151.ger.corp.intel.com ([169.254.4.216]) with mapi id 14.03.0319.002; Wed, 13 Jun 2018 17:15:28 +0100 From: "Trahe, Fiona" To: "Kovacevic, Marko" , "dev@dpdk.org" CC: "De Lara Guarch, Pablo" , "Jain, Deepak K" , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH v1] crypto/qat: add support for 8 byte 3DES Thread-Index: AQHUAjnIIh6FGG5bokSMA9NHFTVPv6ReXKww Date: Wed, 13 Jun 2018 16:15:27 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B435895A8A9D@IRSMSX101.ger.corp.intel.com> References: <20180612103946.34385-1-marko.kovacevic@intel.com> In-Reply-To: <20180612103946.34385-1-marko.kovacevic@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjZmNTIzNDMtOTE5Ni00NWU5LTk2MDQtMWU3OWZjZDk0NTIyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieXlwaWRHcjY1bEkwRUJvTWZpY1RJZkQ5UWZmRGVOS3drS2N4U2crbGhEUjJxUVJXcnBlNFFsaTN3OVVLTVhabCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v1] crypto/qat: add support for 8 byte 3DES 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: Wed, 13 Jun 2018 16:15:42 -0000 Hi Marko, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kovacevic, Marko > Sent: Tuesday, June 12, 2018 11:40 AM > To: dev@dpdk.org > Cc: De Lara Guarch, Pablo ; Jain, Deepak = K > ; Kovacevic, Marko ; = Marko@dpdk.org > Subject: [dpdk-dev] [PATCH v1] crypto/qat: add support for 8 byte 3DES >=20 > Added extra case to support 8 byte key size > for 3DES CBC. Also changed capabilities to reflect > the change. >=20 > Signed-off-by: Marko, Kovacevic > --- > drivers/crypto/qat/qat_adf/qat_algs.h | 1 + > drivers/crypto/qat/qat_adf/qat_algs_build_desc.c | 1 + > drivers/crypto/qat/qat_crypto_capabilities.h | 2 +- > test/test/test_cryptodev_des_test_vectors.h | 6 ++++-- > 4 files changed, 7 insertions(+), 3 deletions(-) This piece of QAT code should also be modified to copy K1 to K2 and K3: if ((cdesc->qat_cipher_alg =3D=3D ICP_QAT_HW_CIPHER_ALGO_3DES) && (cipherkeylen =3D=3D QAT_3DES_KEY_SZ_OPT2)) /* K3 not provided so use K1 =3D K3*/ memcpy(cdesc->cd_cur_ptr, cipherkey, padding_size); else memset(cdesc->cd_cur_ptr, 0, padding_size); cdesc->cd_cur_ptr +=3D padding_size; I can see from the testcode added in the aesni_mb patch, that the test vect= or output (ciphertext512_des) is the same as for plain DES. So as QAT would pad with = 0s, this probably explains why the tests are passing. But I can't see how the test can pass o= n aesni_mb as K1 is being correctly copied there. I must be missing something?