Skip to content

Commit

Permalink
crypto/qat: fix null cipher algo for non 8-byte multiple
Browse files Browse the repository at this point in the history
[ upstream commit 20f1cb1 ]

NULL cipher algo of 4-byte multiple and other sizes caused firmware hang
due to use of wrong mode. Changed from ECB mode to CTR mode to fix.

Fixes: 98f0608 ("crypto/qat: add symmetric session file")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
  • Loading branch information
fionatrahe authored and kevintraynor committed May 8, 2019
1 parent dc7ad46 commit c7fb431
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/crypto/qat/qat_sym_session.c
Expand Up @@ -242,7 +242,8 @@ qat_sym_session_configure_cipher(struct rte_cryptodev *dev,
session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE;
break;
case RTE_CRYPTO_CIPHER_NULL:
session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE;
session->qat_cipher_alg = ICP_QAT_HW_CIPHER_ALGO_NULL;
session->qat_mode = ICP_QAT_HW_CIPHER_CTR_MODE;
break;
case RTE_CRYPTO_CIPHER_KASUMI_F8:
if (qat_sym_validate_kasumi_key(cipher_xform->key.length,
Expand Down

0 comments on commit c7fb431

Please sign in to comment.