[PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Steffen Trumtrar
Add support for the MDHA unit in the SAHARA core. The MDHA can generate hash digests for MD5 and SHA1 in version 3 and additionally SHA224 and SHA256 in version 4. Add the SHA1 and SHA256 algorithms to the driver. The implementation was tested with the in-kernel testmgr on i.MX27 and i.MX53. Sig

[PATCH v2 1/2] crypto: sahara - add support for i.MX53

2014-10-06 Thread Steffen Trumtrar
The Sahara on the i.MX53 is of version 4. Add support for probing the device. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/crypto/fsl-imx-sahara.txt | 2 +- drivers/crypto/sahara.c | 17 ++--- 2 files changed, 15 insertions(+), 4

[PATCH v2 0/2] crypto: sahara - SHA1/256 support

2014-10-06 Thread Steffen Trumtrar
Hi! This series adds support for the SAHARA crypto module on i.MX53 in 1/2 and than adds support for SHA1/256 in 2/2. Changes since last version: - save the hash state in the sahara request struct - fixed the hash remainder calculation Regards, Steffen Steffen Trumtrar (2): cr

[PATCH] crypto: Remove unnecessary KERN_INFO from testmgr.c

2014-10-06 Thread Masanari Iida
This patch remove unncessary KERN_INFO from pr_info within testmgr.c Signed-off-by: Masanari Iida --- crypto/testmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 9459dfd..9d57e3f 100644 --- a/crypto/testmgr.c +++ b/crypto/testm

Re: memset() in crypto code?

2014-10-06 Thread Jason Cooper
On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: > There was recently a patch to the random driver to replace memset() > because, according to the submitter, gcc sometimes optimises memset() > away which might leave data unnecessarily exposed. The solution > suggested was a function ca

Re: memset() in crypto code?

2014-10-06 Thread Sandy Harris
On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper wrote: > On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: >> There was recently a patch to the random driver to replace memset() >> because, according to the submitter, gcc sometimes optimises memset() >> away which might leave data unnece

Re: memset() in crypto code?

2014-10-06 Thread Jason Cooper
On Mon, Oct 06, 2014 at 01:59:06PM -0400, Sandy Harris wrote: > On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper wrote: > > > On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: > >> There was recently a patch to the random driver to replace memset() > >> because, according to the submitter

Re: memset() in crypto code?

2014-10-06 Thread Sandy Harris
On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper wrote: > On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: >> There was recently a patch to the random driver to replace memset() >> because, according to the submitter, gcc sometimes optimises memset() >> away ... > memzero_explicit() is

Re: memset() in crypto code?

2014-10-06 Thread Daniel Borkmann
On 10/06/2014 08:52 PM, Sandy Harris wrote: On Mon, Oct 6, 2014 at 1:44 PM, Jason Cooper wrote: On Sat, Oct 04, 2014 at 11:09:40PM -0400, Sandy Harris wrote: ... There was recently a patch to the random driver to replace memset() because, according to the submitter, gcc sometimes optimises me

Re: [PATCH] crypto: Remove unnecessary KERN_INFO from testmgr.c

2014-10-06 Thread David Miller
From: Masanari Iida Date: Tue, 7 Oct 2014 00:37:54 +0900 > This patch remove unncessary KERN_INFO from pr_info within testmgr.c > > Signed-off-by: Masanari Iida Acked-by: David S. Miller -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to ma

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Herbert Xu
On Mon, Oct 06, 2014 at 04:43:45PM +0200, Steffen Trumtrar wrote: > Add support for the MDHA unit in the SAHARA core. > The MDHA can generate hash digests for MD5 and SHA1 in version 3 and > additionally SHA224 and SHA256 in version 4. > > Add the SHA1 and SHA256 algorithms to the driver. > > The

Re: [PATCH v2 2/2] crypto: sahara - add support for SHA1/256

2014-10-06 Thread Steffen Trumtrar
Hi! On Tue, Oct 07, 2014 at 10:02:01AM +0800, Herbert Xu wrote: > On Mon, Oct 06, 2014 at 04:43:45PM +0200, Steffen Trumtrar wrote: > > Add support for the MDHA unit in the SAHARA core. > > The MDHA can generate hash digests for MD5 and SHA1 in version 3 and > > additionally SHA224 and SHA256 in v