> Hash algorithms: > > * ``RTE_CRYPTO_AUTH_MD5`` > * ``RTE_CRYPTO_AUTH_MD5_HMAC`` > * ``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`` >
It is better to rewrite the description as Support added for MD5, SHA1, SHA224, SHA256, SHA384, SHA512 Authentication algorithms with and without HMAC. > Signed-off-by: Zhangfei Gao <zhangfei....@linaro.org> > --- > doc/guides/cryptodevs/features/uadk.ini | 12 + > doc/guides/cryptodevs/uadk.rst | 15 + > drivers/crypto/uadk/uadk_crypto_pmd.c | 459 ++++++++++++++++++++++++ > 3 files changed, 486 insertions(+) > <Snip> > @@ -72,6 +84,252 @@ RTE_LOG_REGISTER_DEFAULT(uadk_crypto_logtype, > INFO); > ## __VA_ARGS__) > > static const struct rte_cryptodev_capabilities uadk_crypto_v2_capabilities[] > = { > + { /* MD5 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_MD5_HMAC, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, It seems there is a mistake here. Auth algos with HMAC do have keys > 0. I am not sure if your test cases are getting passed with these capabilities. Same comment for all the HMAC capabilities. > + .digest_size = { > + .min = 16, > + .max = 16, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* MD5 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_MD5, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 16, > + .max = 16, > + .increment = 0 > + }, > + }, } > + }, } > + }, > + { /* SHA1 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA1_HMAC, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 20, > + .max = 20, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* SHA1 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA1, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 20, > + .max = 20, > + .increment = 0 > + }, > + }, } > + }, } > + }, > + { /* SHA224 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA224_HMAC, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 28, > + .max = 28, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* SHA224 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA224, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 28, > + .max = 28, > + .increment = 0 > + }, > + }, } > + }, } > + }, > + { /* SHA256 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA256_HMAC, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 32, > + .max = 32, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* SHA256 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA256, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 32, > + .max = 32, > + .increment = 0 > + }, > + }, } > + }, } > + }, > + { /* SHA384 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA384_HMAC, > + .block_size = 128, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 48, > + .max = 48, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* SHA384 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA384, > + .block_size = 64, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 48, > + .max = 48, > + .increment = 0 > + }, > + }, } > + }, } > + }, > + { /* SHA512 HMAC */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA512_HMAC, > + .block_size = 128, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 64, > + .max = 64, > + .increment = 0 > + }, > + .iv_size = { 0 } > + }, } > + }, } > + }, > + { /* SHA512 */ > + .op = RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + {.sym = { > + .xform_type = RTE_CRYPTO_SYM_XFORM_AUTH, > + {.auth = { > + .algo = RTE_CRYPTO_AUTH_SHA512, > + .block_size = 128, > + .key_size = { > + .min = 0, > + .max = 0, > + .increment = 0 > + }, > + .digest_size = { > + .min = 64, > + .max = 64, > + .increment = 0 > + }, > + }, } > + }, } > + },