summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-25 06:24:57 +0100
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:50:28 +0800
commit661cb35e05d1e902b37efcc01e13d715a3a8e4ce (patch)
tree702314de2b2caf3b4fece331e5fb1ae1ec10bf3d
parentded6705d31ce0a8fe8dfcc33924bb7f49d678d99 (diff)
downloaddpdk-stable-661cb35e05d1e902b37efcc01e13d715a3a8e4ce.zip
dpdk-stable-661cb35e05d1e902b37efcc01e13d715a3a8e4ce.tar.gz
dpdk-stable-661cb35e05d1e902b37efcc01e13d715a3a8e4ce.tar.xz
crypto/qat: fix HMAC supported key sizes
[ upstream commit 5668da1eb5897a96b672ac3b610bd3542e3e5cbe ] For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported key sizes are not a fixed value, but a range between 1 and the block size. Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
-rw-r--r--drivers/crypto/qat/qat_crypto_capabilities.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/crypto/qat/qat_crypto_capabilities.h b/drivers/crypto/qat/qat_crypto_capabilities.h
index 1294f24..05dfcae 100644
--- a/drivers/crypto/qat/qat_crypto_capabilities.h
+++ b/drivers/crypto/qat/qat_crypto_capabilities.h
@@ -43,9 +43,9 @@
.algo = RTE_CRYPTO_AUTH_SHA1_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 20, \
@@ -64,9 +64,9 @@
.algo = RTE_CRYPTO_AUTH_SHA224_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 28, \
@@ -85,9 +85,9 @@
.algo = RTE_CRYPTO_AUTH_SHA256_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 64, \
+ .min = 1, \
.max = 64, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 32, \
@@ -106,9 +106,9 @@
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 128, \
+ .min = 1, \
.max = 128, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 48, \
@@ -127,9 +127,9 @@
.algo = RTE_CRYPTO_AUTH_SHA512_HMAC, \
.block_size = 128, \
.key_size = { \
- .min = 128, \
+ .min = 1, \
.max = 128, \
- .increment = 0 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 64, \
@@ -148,9 +148,9 @@
.algo = RTE_CRYPTO_AUTH_MD5_HMAC, \
.block_size = 64, \
.key_size = { \
- .min = 8, \
+ .min = 1, \
.max = 64, \
- .increment = 8 \
+ .increment = 1 \
}, \
.digest_size = { \
.min = 16, \