2012-05-11 08:58:03

by Kasatkin, Dmitry

[permalink] [raw]
Subject: async hash & hmac

Hello,

When allocating hmac like: crypto_alloc_ahash("hmac(sha1)", ..),
it is actually fallsback to "shash" hmac and software shash hash
implementation..
Even when HW accelerator provides AHASH it will not be used with hmac.

Basically HW driver needs to provide its own implementation for async
hmac, like I did for omap-sham.

.cra_name = "hmac(sha1)",
.cra_driver_name = "omap-hmac-sha1",

Is that correct, right?

Thanks.

- Dmitry


2012-05-11 09:37:31

by Herbert Xu

[permalink] [raw]
Subject: Re: async hash & hmac

On Fri, May 11, 2012 at 11:58:03AM +0300, Kasatkin, Dmitry wrote:
> Hello,
>
> When allocating hmac like: crypto_alloc_ahash("hmac(sha1)", ..),
> it is actually fallsback to "shash" hmac and software shash hash
> implementation..
> Even when HW accelerator provides AHASH it will not be used with hmac.
>
> Basically HW driver needs to provide its own implementation for async
> hmac, like I did for omap-sham.
>
> .cra_name = "hmac(sha1)",
> .cra_driver_name = "omap-hmac-sha1",
>
> Is that correct, right?

We can add an async version of hmac if your hardware does not
have direct support for it.

Cheers,
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt