Folks:

I am attempting to implement an ahash instance for a hardware crypto device.

I see that there is a sha1 generic in the soruces a crypto/sha1_generic.c which 
uses the shash interface. I was hoping to use that, but there is some stuff in 
the headers that is confusing.

In include/crypto/hash.h, there is a structure crypto_ahash which has pointers 
to the init, update, final, etc algorithms. These same algorithms are also 
referred to in the ahash_alg structure.

In the case of shash, the crypto_shash structure does not have pointers to the 
algorithms.

Why is the crypto_ahash structure so different? 

There is a function shash_desc_ctx, but there is no function ahash_des_ctx. In 
the crys_sha1_init() function of sha1_generic, you call shash_desc_ctx. If I 
want to use the ahash instead of shash for sha1, then do I use shash_desc_ctx, 
or do I have to come up with my own ahash_desc_ctx?

Thanks

Mark Allyn
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to