Commit 331bf739 authored by Megha Dey's avatar Megha Dey Committed by Herbert Xu

crypto: sha1-mb - async implementation for sha1-mb

Herbert wants the sha1-mb algorithm to have an async implementation:
https://lkml.org/lkml/2016/4/5/286.
Currently, sha1-mb uses an async interface for the outer algorithm
and a sync interface for the inner algorithm. This patch introduces
a async interface for even the inner algorithm.
Signed-off-by: default avatarMegha Dey <megha.dey@linux.intel.com>
Signed-off-by: default avatarTim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 820573eb
This diff is collapsed.
This diff is collapsed.
...@@ -114,14 +114,10 @@ int shash_ahash_update(struct ahash_request *req, struct shash_desc *desc); ...@@ -114,14 +114,10 @@ int shash_ahash_update(struct ahash_request *req, struct shash_desc *desc);
int shash_ahash_finup(struct ahash_request *req, struct shash_desc *desc); int shash_ahash_finup(struct ahash_request *req, struct shash_desc *desc);
int shash_ahash_digest(struct ahash_request *req, struct shash_desc *desc); int shash_ahash_digest(struct ahash_request *req, struct shash_desc *desc);
int shash_ahash_mcryptd_update(struct ahash_request *req, int ahash_mcryptd_update(struct ahash_request *desc);
struct shash_desc *desc); int ahash_mcryptd_final(struct ahash_request *desc);
int shash_ahash_mcryptd_final(struct ahash_request *req, int ahash_mcryptd_finup(struct ahash_request *desc);
struct shash_desc *desc); int ahash_mcryptd_digest(struct ahash_request *desc);
int shash_ahash_mcryptd_finup(struct ahash_request *req,
struct shash_desc *desc);
int shash_ahash_mcryptd_digest(struct ahash_request *req,
struct shash_desc *desc);
int crypto_init_shash_ops_async(struct crypto_tfm *tfm); int crypto_init_shash_ops_async(struct crypto_tfm *tfm);
......
...@@ -39,7 +39,7 @@ struct mcryptd_instance_ctx { ...@@ -39,7 +39,7 @@ struct mcryptd_instance_ctx {
}; };
struct mcryptd_hash_ctx { struct mcryptd_hash_ctx {
struct crypto_shash *child; struct crypto_ahash *child;
struct mcryptd_alg_state *alg_state; struct mcryptd_alg_state *alg_state;
}; };
...@@ -59,13 +59,13 @@ struct mcryptd_hash_request_ctx { ...@@ -59,13 +59,13 @@ struct mcryptd_hash_request_ctx {
struct crypto_hash_walk walk; struct crypto_hash_walk walk;
u8 *out; u8 *out;
int flag; int flag;
struct shash_desc desc; struct ahash_request areq;
}; };
struct mcryptd_ahash *mcryptd_alloc_ahash(const char *alg_name, struct mcryptd_ahash *mcryptd_alloc_ahash(const char *alg_name,
u32 type, u32 mask); u32 type, u32 mask);
struct crypto_shash *mcryptd_ahash_child(struct mcryptd_ahash *tfm); struct crypto_ahash *mcryptd_ahash_child(struct mcryptd_ahash *tfm);
struct shash_desc *mcryptd_shash_desc(struct ahash_request *req); struct ahash_request *mcryptd_ahash_desc(struct ahash_request *req);
void mcryptd_free_ahash(struct mcryptd_ahash *tfm); void mcryptd_free_ahash(struct mcryptd_ahash *tfm);
void mcryptd_flusher(struct work_struct *work); void mcryptd_flusher(struct work_struct *work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment