Re: hmac(sha1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dimitrios Siganos <dimitris@xxxxxxxxxxx> wrote:
>
> 1) Can I implement hmac(sha1) as a CRYPTO_ALG_TYPE_DIGEST algorithm 
> (i.e. use very similar code to sha1)?

DIGEST exists for compatibility only.  No new code will be accepted
that implements a DIGEST algorithms.

> 2) Do I need to create a CRYPTO_ALG_TYPE_HASH algorithm?

HASH is also obsolete.  If your hardware is synchronous, you should
use SHASH which is just as simple to use as DIGEST.  If however
you need asynchronous support, you must use AHASH.

> 3) Is it possible to implement hmac(sha1) as both CRYPTO_ALG_TYPE_DIGEST 
> and CRYPTO_ALG_TYPE_HASH?

Yes but as both types are obsolete your code will not be merged.

> 4) If I use a CRYPTO_ALG_TYPE_HASH, I need to understand the scatterwalk 
> api, is there any help on the subject?

If your hardware is synchronous, you won't need SG lists at all.
Otherwise you can look at how existing drivers under drivers/crypto
do things.

Note that we don't currently have a working asynchronous hash
driver so in a way you'll need to write things from scratch.
However, we're all happy to assist you in this process.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux