aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalakrishna Garapati <balakrishna.garapati@linaro.org>2017-07-13 14:18:25 +0200
committerBalakrishna Garapati <balakrishna.garapati@linaro.org>2017-07-26 08:42:47 +0200
commit27cfa741e4d80919fd352f3660351ac4fb631031 (patch)
tree3a73f50c9452dfd608856de60f7678863b0c951c
parent48ad99f7b4acca7577a17e259f1489cf4c7816d9 (diff)
downloadodp-dpdk-27cfa741e4d80919fd352f3660351ac4fb631031.tar.gz
linux-dpdk:porting "crypto: add HMAC-SHA-512 authentication support"
Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org> Reviewed-and-tested-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r--platform/linux-dpdk/odp_crypto.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index a869262..d95b157 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -140,6 +140,10 @@ static int auth_alg_odp_to_rte(odp_auth_alg_t auth_alg,
auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
auth_xform->auth.digest_length = 20;
break;
+ case ODP_AUTH_ALG_SHA512_HMAC:
+ auth_xform->auth.algo = RTE_CRYPTO_AUTH_SHA512_HMAC;
+ auth_xform->auth.digest_length = 64;
+ break;
case ODP_AUTH_ALG_AES_GCM:
#if ODP_DEPRECATED_API
case ODP_AUTH_ALG_AES128_GCM:
@@ -408,6 +412,10 @@ int odp_crypto_capability(odp_crypto_capability_t *capability)
RTE_CRYPTO_AUTH_SHA1_HMAC) {
hw_auths->bit.sha1_hmac = 1;
}
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA512_HMAC) {
+ hw_auths->bit.sha512_hmac = 1;
+ }
}
cap = &dev_info.capabilities[++i];
}
@@ -479,6 +487,10 @@ int odp_crypto_capability(odp_crypto_capability_t *capability)
RTE_CRYPTO_AUTH_SHA1_HMAC) {
auths->bit.sha1_hmac = 1;
}
+ if (cap_auth_algo ==
+ RTE_CRYPTO_AUTH_SHA512_HMAC) {
+ auths->bit.sha512_hmac = 1;
+ }
}
cap = &dev_info.capabilities[++i];
}