Re: [PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-25 Thread Gilad Ben-Yossef
On Thu, Jun 22, 2017 at 4:58 PM, Dan Carpenter wrote: > On Thu, Jun 22, 2017 at 04:36:55PM +0300, Gilad Ben-Yossef wrote: >> static int ssi_ahash_export(struct ahash_request *req, void *out) >> { >> struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); >>

Re: [PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-25 Thread Gilad Ben-Yossef
On Thu, Jun 22, 2017 at 4:58 PM, Dan Carpenter wrote: > On Thu, Jun 22, 2017 at 04:36:55PM +0300, Gilad Ben-Yossef wrote: >> static int ssi_ahash_export(struct ahash_request *req, void *out) >> { >> struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); >> struct ssi_hash_ctx *ctx =

Re: [PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-22 Thread Dan Carpenter
On Thu, Jun 22, 2017 at 04:36:55PM +0300, Gilad Ben-Yossef wrote: > static int ssi_ahash_export(struct ahash_request *req, void *out) > { > struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); > struct ssi_hash_ctx *ctx = crypto_ahash_ctx(ahash); > + struct device *dev =

Re: [PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-22 Thread Dan Carpenter
On Thu, Jun 22, 2017 at 04:36:55PM +0300, Gilad Ben-Yossef wrote: > static int ssi_ahash_export(struct ahash_request *req, void *out) > { > struct crypto_ahash *ahash = crypto_ahash_reqtfm(req); > struct ssi_hash_ctx *ctx = crypto_ahash_ctx(ahash); > + struct device *dev =

[PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-22 Thread Gilad Ben-Yossef
Hash import and export was saving and restoring the wrong context and therefore disabled. Fix it by restoring intermediate digest and additional state needed. The hash and mac transform now pass testmgr partial hash tests. Signed-off-by: Gilad Ben-Yossef ---

[PATCH v2 1/7] staging: ccree: fix hash import/export

2017-06-22 Thread Gilad Ben-Yossef
Hash import and export was saving and restoring the wrong context and therefore disabled. Fix it by restoring intermediate digest and additional state needed. The hash and mac transform now pass testmgr partial hash tests. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_hash.c |