Hi Marko, > -----Original Message----- > From: dev [mailto:dev-boun...@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.gua...@intel.com>; Jain, Deepak K > <deepak.k.j...@intel.com>; Kovacevic, Marko <marko.kovace...@intel.com>; > ma...@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.kovace...@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?