crypto/qat: support plain SHA1..SHA512 hashes
PATCH 1/1 crypto/qat: support plain SHA1..SHA512 hashes
This patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
--- app/test/test_cryptodev_hash_test_vectors.h | 10 ++ doc/guides/cryptodevs/features/qat.ini | 5 + doc/guides/cryptodevs/qat.rst | 5 + drivers/crypto/qat/qat_sym_capabilities.h | 105 ++++++++++++++++++ drivers/crypto/qat/qat_sym_session.c | 113 ++++++++++++++++++-- drivers/crypto/qat/qat_sym_session.h | 1 + 6 files changed, 232 insertions(+), 7 deletions(-)
app/test/test_cryptodev_hash_test_vectors.h +10 -0
@@ -460,6 +460,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha1_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_GEN , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -473,6 +474,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha1_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_VERIFY , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -540,6 +542,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha224_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_GEN , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -553,6 +556,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha224_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_VERIFY , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -596,6 +600,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha256_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_GEN , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -609,6 +614,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha256_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_VERIFY , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -654,6 +660,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha384_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_GEN , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -667,6 +674,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha384_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_VERIFY , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -712,6 +720,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha512_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_GEN , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
@@ -724,6 +733,7 @@ static const struct blockcipher_test_case hash_test_cases[] = { .test_data = &sha512_test_vector, .op_mask =BLOCKCIPHER_TEST_OP_AUTH_VERIFY , .pmd_mask = BLOCKCIPHER_TEST_TARGET_PMD_OPENSSL | +BLOCKCIPHER_TEST_TARGET_PMD_QAT |BLOCKCIPHER_TEST_TARGET_PMD_CCP |BLOCKCIPHER_TEST_TARGET_PMD_MVSAM | #if IMB_VERSION_NUM >= IMB_VERSION(0, 52, 0)
doc/guides/cryptodevs/features/qat.ini +5 -0
@@ -44,10 +44,15 @@ ZUC EEA3 = Y [Auth] NULL = Y MD5 HMAC = Y +SHA1 = Y SHA1 HMAC = Y +SHA224 = Y SHA224 HMAC = Y +SHA256 = Y SHA256 HMAC = Y +SHA384 = Y SHA384 HMAC = Y +SHA512 = Y SHA512 HMAC = Y AES GMAC = Y SNOW3G UIA2 = Y
doc/guides/cryptodevs/qat.rst +5 -0
@@ -52,10 +52,15 @@ Cipher algorithms: Hash algorithms: +* ``RTE_CRYPTO_AUTH_SHA1`` * ``RTE_CRYPTO_AUTH_SHA1_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA224`` * ``RTE_CRYPTO_AUTH_SHA224_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA256`` * ``RTE_CRYPTO_AUTH_SHA256_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA384`` * ``RTE_CRYPTO_AUTH_SHA384_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA512`` * ``RTE_CRYPTO_AUTH_SHA512_HMAC`` * ``RTE_CRYPTO_AUTH_AES_XCBC_MAC`` * ``RTE_CRYPTO_AUTH_SNOW3G_UIA2``
drivers/crypto/qat/qat_sym_capabilities.h +105 -0
111 lines not on this page · raw message
drivers/crypto/qat/qat_sym_session.c +106 -7
177 lines not on this page · raw message
drivers/crypto/qat/qat_sym_session.h +1 -0
@@ -67,6 +67,7 @@ struct qat_sym_session {enum icp_qat_hw_cipher_mode qat_mode;enum icp_qat_hw_auth_algo qat_hash_alg;enum icp_qat_hw_auth_op auth_op; +enum icp_qat_hw_auth_mode auth_mode;void *bpi_ctx;struct qat_sym_cd cd;uint8_t *cd_cur_ptr;
Signature · 1 line
2.17.1
Quoted 9 lines
-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Tuesday, April 14, 2020 1:24 PM
To: [email protected]; Trahe, Fiona <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH]crypto/qat: support plain SHA1..SHA512 hashes
Quoted 4 lines
This patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
Signed-off-by Adam Dybkowski <[email protected]>
Quoted 6 lines
This patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
Signed-off-by Adam Dybkowski <[email protected]>---
App/test changes may not be required.
Rebase this patch over Pablo's crypto test refactoring.
v2 cover crypto/qat: support plain SHA1..SHA512 hashes
In reply to Adam DybkowskiThis patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
v2:
* simplify the tests, rebase the code on top of Pablo De Lara Guarch patches
* update the release notes
Adam Dybkowski (1):
crypto/qat: support plain SHA1..SHA512 hashes
doc/guides/cryptodevs/features/qat.ini | 5 + doc/guides/cryptodevs/qat.rst | 5 + doc/guides/rel_notes/release_20_05.rst | 5 + drivers/crypto/qat/qat_sym_capabilities.h | 105 ++++++++++++++++++++ drivers/crypto/qat/qat_sym_session.c | 113 ++++++++++++++++++++-- drivers/crypto/qat/qat_sym_session.h | 1 + 6 files changed, 227 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/1 crypto/qat: support plain SHA1..SHA512 hashes
This patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
--- doc/guides/cryptodevs/features/qat.ini | 5 + doc/guides/cryptodevs/qat.rst | 5 + doc/guides/rel_notes/release_20_05.rst | 5 + drivers/crypto/qat/qat_sym_capabilities.h | 105 ++++++++++++++++++++ drivers/crypto/qat/qat_sym_session.c | 113 ++++++++++++++++++++-- drivers/crypto/qat/qat_sym_session.h | 1 + 6 files changed, 227 insertions(+), 7 deletions(-)
doc/guides/cryptodevs/features/qat.ini +5 -0
@@ -44,10 +44,15 @@ ZUC EEA3 = Y [Auth] NULL = Y MD5 HMAC = Y +SHA1 = Y SHA1 HMAC = Y +SHA224 = Y SHA224 HMAC = Y +SHA256 = Y SHA256 HMAC = Y +SHA384 = Y SHA384 HMAC = Y +SHA512 = Y SHA512 HMAC = Y AES GMAC = Y SNOW3G UIA2 = Y
doc/guides/cryptodevs/qat.rst +5 -0
@@ -52,10 +52,15 @@ Cipher algorithms: Hash algorithms: +* ``RTE_CRYPTO_AUTH_SHA1`` * ``RTE_CRYPTO_AUTH_SHA1_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA224`` * ``RTE_CRYPTO_AUTH_SHA224_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA256`` * ``RTE_CRYPTO_AUTH_SHA256_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA384`` * ``RTE_CRYPTO_AUTH_SHA384_HMAC`` +* ``RTE_CRYPTO_AUTH_SHA512`` * ``RTE_CRYPTO_AUTH_SHA512_HMAC`` * ``RTE_CRYPTO_AUTH_AES_XCBC_MAC`` * ``RTE_CRYPTO_AUTH_SNOW3G_UIA2``
doc/guides/rel_notes/release_20_05.rst +5 -0
@@ -81,6 +81,11 @@ New Features by making use of the event device capabilities. The event mode currently supports only inline IPsec protocol offload. +* **Added plain SHA-1,224,256,384,512 support to QAT PMD.** + + Added support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes + to QAT PMD. + Removed Items -------------
drivers/crypto/qat/qat_sym_capabilities.h +105 -0
111 lines not on this page · raw message
drivers/crypto/qat/qat_sym_session.c +106 -7
177 lines not on this page · raw message
drivers/crypto/qat/qat_sym_session.h +1 -0
@@ -67,6 +67,7 @@ struct qat_sym_session {enum icp_qat_hw_cipher_mode qat_mode;enum icp_qat_hw_auth_algo qat_hash_alg;enum icp_qat_hw_auth_op auth_op; +enum icp_qat_hw_auth_mode auth_mode;void *bpi_ctx;struct qat_sym_cd cd;uint8_t *cd_cur_ptr;
Signature · 1 line
2.17.1
Quoted 7 lines
-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Thursday, 16 April, 2020 14:25
To: [email protected]; Trahe, Fiona <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH v2 1/1]crypto/qat: support plain SHA1..SHA512 hashes
Important:
this patch requires merging these series first:
http://patches.dpdk.org/project/dpdk/list/?series=9371
http://patches.dpdk.org/project/dpdk/list/?series=9372
http://patches.dpdk.org/project/dpdk/list/?series=9373
(in this particular order).
Adam Dybkowski
Akhil Goyal
AppliedQuoted 7 lines
This patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
Signed-off-by Adam Dybkowski <[email protected]>Acked-by Fiona Trahe <[email protected]>---
Applied to dpdk-next-crypto
Thanks.
Quoted 10 lines
-----Original Message-----
From: Dybkowski, AdamX <[email protected]>
Sent: Thursday, 16 April, 2020 14:25
To: [email protected]; Trahe, Fiona <[email protected]>; [email protected]
Cc: Dybkowski, AdamX <[email protected]>
Subject: [PATCH v2 0/1]crypto/qat: support plain SHA1..SHA512 hashesThis patch adds support for plain SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 hashes to QAT PMD.
Important:
this patch requires merging these series first:
http://patches.dpdk.org/project/dpdk/list/?series=9371
http://patches.dpdk.org/project/dpdk/list/?series=9372
http://patches.dpdk.org/project/dpdk/list/?series=9373
(in this particular order).
Adam Dybkowski