Hi, The current hash_alg struct is: struct hash_alg { int (*init)(struct hash_desc *desc); int (*update)(struct hash_desc *desc, struct scatterlist *sg, unsigned int nbytes); int (*final)(struct hash_desc *desc, u8 *out); int (*digest)(struct hash_desc *desc, struct scatterlist *sg, unsigned int nbytes, u8 *out); int (*setkey)(struct crypto_hash *tfm, const u8 *key, unsigned int keylen); unsigned int digestsize; }; It looks like update and final functions are used for continuous hashing. And digest function is used for single hashing. I was thing changing to this for async: struct ahash_alg { int (*init)(struct ahash_request *req); int (*digest)(struct ahash_request *req); int (*setkey)(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen); unsigned int digestsize; }; But it seems like there is still a need to support continuation hashing as well as just single hash. Questions: 1. Is my assume about update/final and digest function correct? 2. What is the difference between digest and hash type besides one operation on transformation structure (tfm) and the other on descriptor (desc)? 3. Currently, cryptodev-2.6 git doesn't work under PPC4xx development board but Denx linux latest works. Have anyone tested on PPC4xx board? The context between update and final function will be moved into the request just like ablkcipher. -Loc -----Original Message----- From: Herbert Xu [mailto:herbert@xxxxxxxxxxxxxxxxxxx] Sent: Thursday, January 17, 2008 3:23 AM To: Loc Ho Cc: linux-crypto@xxxxxxxxxxxxxxx Subject: Re: New Crypto Hardware On Wed, Jan 16, 2008 at 10:19:04AM -0800, Loc Ho wrote: > Hi, > > For hashing, there are HMAC key if HMAC and digest size. As digest > size is part of the algorithm, there is only HMAC key. Are you > referring to moving the HMAC key from transformation into the request > structure? As I am modeled after ablkcipher_request structure, there > will be a context point 'void *__ctx[] CRYPTO_MINALIGN_ATTR;' for the request operation. No I meant the context that has to be stored between calls to crypto_hash_update and crypto_hash_final. 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