[PATCH v6 4/4] crypto: starfive - Add hash and HMAC support

Christophe JAILLET christophe.jaillet at wanadoo.fr
Wed Apr 26 01:09:50 PDT 2023


Le 26/04/2023 à 08:58, Jia Jie Ho a écrit :
> Adding hash/HMAC support for SHA-2 and SM3 to StarFive cryptographic
> module.
> 
> Co-developed-by: Huan Feng <huan.feng-bONrM45KWFOXmMXjJBpWqg at public.gmane.org>
> Signed-off-by: Huan Feng <huan.feng-bONrM45KWFOXmMXjJBpWqg at public.gmane.org>
> Signed-off-by: Jia Jie Ho <jiajie.ho-bONrM45KWFOXmMXjJBpWqg at public.gmane.org>
> ---
>   drivers/crypto/starfive/Kconfig       |   4 +
>   drivers/crypto/starfive/Makefile      |   2 +-
>   drivers/crypto/starfive/jh7110-cryp.c |  38 ++
>   drivers/crypto/starfive/jh7110-cryp.h |  70 +-
>   drivers/crypto/starfive/jh7110-hash.c | 896 ++++++++++++++++++++++++++
>   5 files changed, 1006 insertions(+), 4 deletions(-)
>   create mode 100644 drivers/crypto/starfive/jh7110-hash.c
> 

[...]

> +int starfive_hash_register_algs(void)
> +{
> +	int ret = 0;
> +
> +	ret = crypto_register_ahashes(algs_sha2_sm3, ARRAY_SIZE(algs_sha2_sm3));
> +
> +	return ret;

Nit: return crypto_register_ahashes(algs_sha2_sm3, 
ARRAY_SIZE(algs_sha2_sm3));

?

> +}
> +
> +void starfive_hash_unregister_algs(void)
> +{
> +	crypto_unregister_ahashes(algs_sha2_sm3, ARRAY_SIZE(algs_sha2_sm3));
> +}




More information about the linux-riscv mailing list