summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkhil Goyal <akhil.goyal@nxp.com>2017-07-27 17:24:08 +0530
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:50:28 +0800
commit3692a2990e289f54a8f37d165d358a4c38db6e30 (patch)
tree511aa450997155b771f8dc112657321232cda00c
parent70a5f69d0f71953d50f0828e0301f697225d3fb6 (diff)
downloaddpdk-stable-3692a2990e289f54a8f37d165d358a4c38db6e30.zip
dpdk-stable-3692a2990e289f54a8f37d165d358a4c38db6e30.tar.gz
dpdk-stable-3692a2990e289f54a8f37d165d358a4c38db6e30.tar.xz
crypto/dpaa2_sec: fix HMAC supported key sizes
[ upstream commit f947fd77185fef15e6c8471c11c9beb2f1c3a018 ] 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: 623326dded3a ("crypto/dpaa2_sec: introduce poll mode driver") Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
-rw-r--r--drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
index f5c6169..e02bf72 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h
@@ -204,9 +204,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_MD5_HMAC,
.block_size = 64,
.key_size = {
- .min = 64,
+ .min = 1,
.max = 64,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 16,
@@ -225,9 +225,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.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,
@@ -246,9 +246,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.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,
@@ -267,9 +267,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.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,
@@ -288,9 +288,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.algo = RTE_CRYPTO_AUTH_SHA384_HMAC,
.block_size = 128,
.key_size = {
- .min = 128,
+ .min = 1,
.max = 128,
- .increment = 0
+ .increment = 1
},
.digest_size = {
.min = 48,
@@ -309,9 +309,9 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
.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,