Re: Parity Error on keys used for DES crypto test

2014-04-24 Thread leroy christophe
Le 24/04/2014 01:58, Kim Phillips a écrit : On Wed, 23 Apr 2014 10:20:16 +0200 leroy christophe christophe.le...@c-s.fr wrote: I'm altering the Freescale Talitos Driver in order to support the SEC1 security engine, and I have a big issue with the DES test vectors in testmgr.h: The Sec Engine

Freescale SEC1 and HMAC

2014-04-24 Thread leroy christophe
In the Talitos driver, there is a TALITOS_FTR_HMAC_OK flag which is set only for SEC2.1 Is there any reason for that ? According to the doc, SEC2 and SEC1 all seems to support HMAC. However I have tried it on SEC1 and it seems that it doesn't work properly when wanting to perform a

Freescale SEC1 and AEAD / IPSEC

2014-04-24 Thread leroy christophe
I'm progressing well on the SEC1 implementation. I now have HASH (non HMAC) , DES and AES working properly. So it is now time to look at AEAD. I don't know much yet about crypto algorithm so forgive me if I ask stupid questions. The SEC1 doesn't have the IPSEC descriptor that SEC2 has.

[PATCH 08/11] crypto: caam: Clean up report_deco_status()

2014-04-24 Thread Marek Vasut
Clean this function up and rework it into sensible shape. This function now contains one single dev_err() instead of the previous insanity full of memory allocation, chaotic string handling and use of SPRINTFCAT(). Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu

[PATCH 06/11] crypto: caam: Dissolve report_jump_idx()

2014-04-24 Thread Marek Vasut
Just dissolve this function so it's not in the way of applying further white magic cleanup down the line. Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/error.c | 32

[PATCH 04/11] crypto: caam: Pass error type into the functions

2014-04-24 Thread Marek Vasut
Pass the error type string into the functions, so they can handle the printing of the string. This is now still using the very unsafe sprintf(), but we will fix that. While at this, pass the device pointer too, so we can dev_err() functions readily when we start fixing this proper.

[PATCH 00/11] crypto: caam: Error reporting fixes

2014-04-24 Thread Marek Vasut
First stab at reworking the error.c thing in Freescale CAAM. This patchset cleans it up so it's not doing any too insane string messing anymore. NOTE: Can someone please test this on real hardware? I have none at hand, so THIS IS COMPILE-TESTED ONLY! Marek Vasut (11): crypto: caam:

[PATCH 03/11] crypto: caam: Implement fast-path for error codes with no handler

2014-04-24 Thread Marek Vasut
Implement fast-path error code printout for errors with no associated handler function. This reduces calls to this kmalloc() nonsense in SPRINTFCAT() already. Note that the format of output is compatible with the old code, even if -- exposed like this -- it looks a bit weird. Checkpatch complains

[PATCH 02/11] crypto: caam: Pull all the error codes out

2014-04-24 Thread Marek Vasut
Pull the error code - error string mapping tables out of the function so the code becomes readable. This lets me see the real flesh of the functions, without all that flab clouding the view. Note: There is a checkpatch issue with quoted strings across multiple lines. I will fix that in a

[PATCH 10/11] crypto: caam: Sweep the remnants

2014-04-24 Thread Marek Vasut
Clean up the remnants from the rework. Constify function arguments. Note that checkpatch again complains about this space before newline, but this is the original code behavior, so I'm keeping it. Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Horia

[PATCH 09/11] crypto: caam: Kill SPRINTFCAT() with fire

2014-04-24 Thread Marek Vasut
This macro is just like an encyclopedia of string handling done wrong. This must die. This is so wrong on so many levels. Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Horia Geanta horia.gea...@freescale.com --- drivers/crypto/caam/error.c | 10

[PATCH 01/11] crypto: caam: Contain caam_jr_strstatus() ugliness

2014-04-24 Thread Marek Vasut
The tentacles of this function were firmly attached to various places in the CAAM code. Just cut them, or this cthulhu function will sprout them anew. Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu herb...@gondor.apana.org.au Cc: Horia Geanta horia.gea...@freescale.com ---

[PATCH 07/11] crypto: caam: Clean up report_ccb_status()

2014-04-24 Thread Marek Vasut
Clean this function up and rework it into sensible shape. This function now contains one single dev_err() instead of the previous insanity full of memory allocation, possible stack overwriting, chaotic string handling and use of SPRINTFCAT(). Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert

[PATCH 11/11] crypto: caam: Fix the 'quoted string split across lines'

2014-04-24 Thread Marek Vasut
Fix the checkpatch warnings that the strings were split across multiple lines. Checkpatch now complains about lines over 80, but this is better, since we can actually grep the source code for these strings now. Signed-off-by: Marek Vasut ma...@denx.de Cc: Herbert Xu herb...@gondor.apana.org.au

[PATCH] crypto: user - Allow CRYPTO_MSG_GETALG without CAP_NET_ADMIN

2014-04-24 Thread Matthias-Christian Ott
CRYPTO_USER requires CAP_NET_ADMIN for all operations. Most information provided by CRYPTO_MSG_GETALG is also accessible through /proc/modules and AF_ALG. CRYPTO_MSG_GETALG should not require CAP_NET_ADMIN so that processes without CAP_NET_ADMIN can use CRYPTO_MSG_GETALG to get cipher details,