From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: "Kovacevic, Marko" <marko.kovacevic@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>,
"Jain, Deepak K" <deepak.k.jain@intel.com>,
"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [PATCH v1] crypto/qat: add support for 8 byte 3DES
Date: Wed, 13 Jun 2018 16:15:27 +0000 [thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B435895A8A9D@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <20180612103946.34385-1-marko.kovacevic@intel.com>
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 <pablo.de.lara.guarch@intel.com>; Jain, Deepak K
> <deepak.k.jain@intel.com>; Kovacevic, Marko <marko.kovacevic@intel.com>; Marko@dpdk.org
> Subject: [dpdk-dev] [PATCH v1] crypto/qat: add support for 8 byte 3DES
>
> Added extra case to support 8 byte key size
> for 3DES CBC. Also changed capabilities to reflect
> the change.
>
> Signed-off-by: Marko, Kovacevic <marko.kovacevic@intel.com>
> ---
> 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 == ICP_QAT_HW_CIPHER_ALGO_3DES)
&& (cipherkeylen == QAT_3DES_KEY_SZ_OPT2))
/* K3 not provided so use K1 = K3*/
memcpy(cdesc->cd_cur_ptr, cipherkey, padding_size);
else
memset(cdesc->cd_cur_ptr, 0, padding_size);
cdesc->cd_cur_ptr += padding_size;
I can see from the testcode added in the aesni_mb patch, that the test vector 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 on aesni_mb
as K1 is being correctly copied there. I must be missing something?
next prev parent reply other threads:[~2018-06-13 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 10:39 Kovacevic, Marko
2018-06-13 16:15 ` Trahe, Fiona [this message]
2018-07-04 10:20 ` [dpdk-dev] [PATCH v2] " Kovacevic, Marko
2018-07-20 18:49 ` [dpdk-dev] [PATCH v3] " Fiona Trahe
2018-07-23 8:55 ` De Lara Guarch, Pablo
2018-07-23 8:56 ` De Lara Guarch, Pablo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=348A99DA5F5B7549AA880327E580B435895A8A9D@IRSMSX101.ger.corp.intel.com \
--to=fiona.trahe@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=marko.kovacevic@intel.com \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).