[EXT] [PATCH resend v5 5/6] crypto/uadk: support auth algorithms
Zhangfei Gao
zhangfei.gao at linaro.org
Wed Oct 26 12:02:16 CEST 2022
On 2022/10/25 下午10:38, Akhil Goyal wrote:
>> 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.gao at 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.
After double confirmed, and studied the openssl crypto config.
The hash do not have key, so value is 0
But HMAC need key,
After using openssl crypto value,
the passed case increased from 50 to 72, though no reported fail case in
both case.
Thanks for the reminding.
More information about the dev
mailing list