Re: [v9 PATCH] crypto: caam - add support for RSA algorithm

2016-07-04 Thread Cristian Stoica
Hi Herbert, I've tried the following builds and both fail: make mrproper make defconfig make drivers/crypto/qat/qat_common/qat_asym_algs.o drivers/crypto/qat/qat_common/qat_asym_algs.c:55:32: fatal error: qat_rsapubkey-asn1.h: No such file or directory #include "qat_rsapubkey-asn1.h"

RE: [PATCH v2 2/4] crypto: rsa_helper - add raw integer parser actions

2016-03-28 Thread Cristian Stoica
ead of MPI keys. > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > --- > crypto/rsa.c | 15 > crypto/rsa_helper.c | 182 > +

RE: [PATCH v2 1/4] crypto: rsa - generalize ASN.1 sequences

2016-03-28 Thread Cristian Stoica
rser > actions (return MPI or raw integer keys), followed by a key representation > structure (for MPI or raw integers). > > This approach has the advantage that users can select specific parser actions > by using a general parser with function pointers to specific actions. > > Signe

RE: [PATCH v2 1/3] crypto: scatterwak - Add scatterwalk_sg_copychunks

2016-03-28 Thread Cristian Stoica
> chunk of data from a scatterwalk to another scatterwalk. > It will be used by caam driver to remove the leading zeros of RSA's algorithm > output. > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > ---

RE: [PATCH v2 2/3] crypto: scatterwalk - export scatterwalk_pagedone

2016-03-28 Thread Cristian Stoica
uilt as a > module. > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > --- > crypto/scatterwalk.c | 5 +++-- > include/crypto/scatterwalk.h | 2 ++ > 2 files changed, 5 insertions(+), 2 de

RE: [PATCH v2 3/3] crypto: caam - add support for RSA algorithm

2016-03-28 Thread Cristian Stoica
yashpal.du...@freescale.com> > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > --- > drivers/crypto/caam/Kconfig| 12 + > drivers/crypto/caam/Makefile | 4 + > drivers/crypto/caam/caampk

RE: [PATCH v2 4/4] crypto: rsa_helper - export symbols for asn1 structures

2016-03-28 Thread Cristian Stoica
t; can (will) be used by caam and qat drivers. > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > --- > crypto/rsa_helper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/crypto/rsa

RE: [PATCH v2 3/4] crypto: add CONFIG_ symbol for rsa helper

2016-03-28 Thread Cristian Stoica
_HELPER. > > Signed-off-by: Tudor Ambarus <tudor-dan.amba...@nxp.com> Acked-by: Cristian Stoica <cristian.sto...@nxp.com> > --- > crypto/Kconfig | 8 ++-- > crypto/Makefile | 6 +++--- > 2 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/crypto

Re: [PATCH 1/3] crypto: authenc - add TLS type encryption

2016-03-09 Thread Cristian Stoica
Hi Tadeusz, >> SSL/TLS is prone to this implementation issue and many user-space libraries >> got this wrong. It would be good to see >>some numbers to back-up the claim >> of timing differences as not being an issue for this one. >It is hard to get the implementation right when the protocol

Re: [PATCH 1/3] crypto: authenc - add TLS type encryption

2016-03-08 Thread Cristian Stoica
7, 2016 4:31 PM To: Cristian Stoica; herb...@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org; linux-ker...@vger.kernel.org; da...@davemloft.net Subject: Re: [PATCH 1/3] crypto: authenc - add TLS type encryption Hi Cristian, On 03/07/2016 01:05 AM, Cristian Stoica wrote: > Hi Tadeusz

Re: [PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-04 Thread Cristian Stoica
On 03/04/2015 08:34 PM, Kim Phillips wrote: I don't see how, e.g., for one, dma_map_sg is I/O TLB implementation-dependent. I'll need some remedial classes on this topic, but for the moment I don't see how this matters for mapping sg chains. Can you share some pointers? Thanks, Cristian S.

Re: [PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-04 Thread Cristian Stoica
Hi Yanjiang, On 03/04/2015 04:32 AM, yjin wrote: On 2015年03月04日 02:59, Kim Phillips wrote: On Tue, 3 Mar 2015 14:50:51 +0800 yanjiang@windriver.com wrote: This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but

Re: [PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-04 Thread Cristian Stoica
Hi Yanjiang, On 03/04/2015 04:32 AM, yjin wrote: On 2015年03月04日 02:59, Kim Phillips wrote: On Tue, 3 Mar 2015 14:50:51 +0800 yanjiang@windriver.com wrote: This commit is to avoid the below warnings: drivers/crypto/caam/sg_sw_sec4.h:88:12: warning: 'dma_map_sg_chained' defined but not

Re: [PATCH 1/3] crypto: caam: fix some compile warnings

2015-03-04 Thread Cristian Stoica
On 03/04/2015 06:57 AM, yjin wrote: An alternative is moving the definitions to a .c file, but I don't think it will be fundamental different. I know I am fixing a potential error which doesn't exist now, it seems useless for the current upstream version, we can abandon my patch. But I still

Re: [PATCH] crypto: tcrypt speed: fix filter for aead algorithms

2015-02-27 Thread Cristian Stoica
Hi Herbert, On 02/27/2015 11:25 AM, Herbert Xu wrote: On Tue, Feb 03, 2015 at 03:59:48PM +0200, Cristian Stoica wrote: test_aead_speed is written for sync algorithms without specifically [...] Please fix it to test asynchronously instead. Thanks for review. I think that a fix for async aead

[PATCH] crypto: tcrypt speed: fix filter for aead algorithms

2015-02-03 Thread Cristian Stoica
test_aead_speed is written for sync algorithms without specifically requiring them. The effect is that an async algorithm may be used without setting up the request callback, this leading to a kernel panic. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/tcrypt.c | 3

[PATCH] crypto: tcrypt: do not allocate iv on stack for aead speed tests

2015-01-28 Thread Cristian Stoica
See also: 9bac019dad8098a77cce555d929f678e22111783 Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/tcrypt.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 2b2486a..4b9e23f 100644 --- a/crypto

[PATCH] crypto: testmgr: limit IV copy length in aead tests

2015-01-28 Thread Cristian Stoica
The working copy of IV is the same size as the transformation's IV. It is not necessary to copy more than that from the template since iv_len is usually less than MAX_IVLEN and the rest of the copied data is garbage. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto

[PATCH] crypto: tcrypt: fix buflen reminder calculation

2015-01-27 Thread Cristian Stoica
the first 'if' is never executed. - Rearrange the second part of the code to remove the conditional from the loop Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/tcrypt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crypto/tcrypt.c

[PATCH 2/2] crypto: caam: fix resource clean-up on error path for caam_jr_init

2015-01-22 Thread Cristian Stoica
Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/jr.c | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index bce2959..b8b5d47 100644 --- a/drivers/crypto

[PATCH 1/2] crypto: caam: pair irq map and dispose in the same function

2015-01-22 Thread Cristian Stoica
irq_dispose_mapping is not called on all error paths from caam_jr_init. This takes care of several clean-up issues by performing resource clean-up and allocation at the same level. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/jr.c | 6 +++--- 1 file

[PATCH 1/2] crypto: caam: remove dead code

2015-01-21 Thread Cristian Stoica
- assoc_nents and src_nents are never zero when all_contig is false - iv_contig is zero on the else branch Signed-off-by: Cristian Stoica cristian.sto...@freescale.com Reviewed-by: Richard Schmitt richard.schm...@freescale.com --- drivers/crypto/caam/caamalg.c | 14 +++--- 1 file changed

[PATCH 2/2] crypto: caam: remove unused local variable

2015-01-21 Thread Cristian Stoica
Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/ctrl.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 70f1e6f..efba4cc 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers

Re: [PATCH] crypto: caam - don't emit ICV check failures to dmesg

2015-01-21 Thread Cristian Stoica
Hi Kim, On 01/20/2015 08:43 PM, Kim Phillips wrote: ICV check failures are part of normal operation; leave user notification up to the higher levels, as is done in s/w algorithm implementations. Tested on P4080DS. Tested-by: Cristian Stoica cristian.sto...@freescale.com Thanks, Cristian

[PATCH] crypto: replace scatterwalk_sg_next with sg_next

2015-01-20 Thread Cristian Stoica
Modify crypto drivers to use the generic SG helper since both of them are equivalent and the one from crypto is redundant. See also: 468577abe37ff7b453a9ac613e0ea155349203ae reverted in b2ab4a57b018aafbba35bff088218f5cc3d2142e Signed-off-by: Cristian Stoica cristian.sto...@freescale.com

[PATCH] crypto: testmgr: notify expected failures on aead tests

2015-01-19 Thread Cristian Stoica
them as harmless. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/testmgr.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 235b1ff..ec19e98 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c

Re: [PATCH v2] crypto: caam: fix error reporting

2014-11-06 Thread Cristian Stoica
Hi Kim, Herbert, On 11/05/2014 06:43 PM, Kim Phillips wrote: On Wed, 5 Nov 2014 11:21:24 +0200 Cristian Stoica cristian.sto...@freescale.com wrote: The error code returned by hardware is four bits wide with an expected zero MSB. A hardware error condition where the error code can get

[PATCH v2] crypto: caam: fix error reporting

2014-11-05 Thread Cristian Stoica
and reports the condition. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/error.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 6531054..66d73bf 100644

Re: [PATCH] crypto: caam: fix error reporting

2014-11-05 Thread Cristian Stoica
Hi Kim, On 11/04/2014 06:57 PM, Kim Phillips wrote: On Tue, 4 Nov 2014 10:57:57 +0200 Cristian Stoica cristian.sto...@freescale.com wrote: Do you want me to drop the patch and pretend there is nothing to see? no, fixing potential bugs preemptively is fine; I'd just like to know that's

Re: [PATCH] crypto: caam: fix error reporting

2014-11-04 Thread Cristian Stoica
Hi Kim, Actually, our static code analyzer did not see this one. ok, so the patch technically isn't fixing anything broken, then. Are you saying the code isn't broken _because_ a static tool analyser did not see anything wrong here? the new code just added a new condition, which doesn't

Re: [PATCH] crypto: caam: fix error reporting

2014-11-03 Thread Cristian Stoica
Hi Kim, On 10/31/2014 08:22 PM, Kim Phillips wrote: On Fri, 31 Oct 2014 18:57:33 +0200 Cristian Stoica cristian.sto...@freescale.com wrote: If this issue was brought up by h/w, the appropriate new error codes should be being introduced. If you have the new error codes please send them

[PATCH] crypto: caam: fix error reporting

2014-10-31 Thread Cristian Stoica
and reports the condition. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/error.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 6531054..c4483ad 100644

[PATCH] crypto: caam: fix missing dma unmap on error path

2014-10-30 Thread Cristian Stoica
If dma mapping for dma_addr_out fails, the descriptor memory is freed but the previous dma mapping for dma_addr_in remains. This patch resolves the missing dma unmap and groups resource allocations at function start. Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Cristian Stoica cristian.sto

caamhash.c fixes

2014-08-14 Thread Cristian Stoica
This is a set of two independent fixes for caamhash driver drivers/crypto/caam/caamhash.c | 28 +--- drivers/crypto/caam/sg_sw_sec4.h | 54 -- 2 files changed, 17 insertions(+), 65 deletions(-) -- To unsubscribe from

[PATCH 1/2] crypto: caamhash.c: remove duplicated sg copy functions

2014-08-14 Thread Cristian Stoica
a4a18a1094a0306c ]--- Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/caamhash.c | 22 ++-- drivers/crypto/caam/sg_sw_sec4.h | 54 2 files changed, 14 insertions(+), 62

[PATCH 2/2] crypto: caamhash.c: fix addressing of struct member

2014-08-14 Thread Cristian Stoica
buf_0 and buf_1 in caam_hash_state are not next to each other. Accessing buf_1 is incorrect from buf_0 with an offset of only size_of(buf_0). The same issue is also with buflen_0 and buflen_1 Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Cristian Stoica cristian.sto...@freescale.com

[PATCH 1/3] crypto: testmgr.c: white space removal on __test_hash

2014-08-08 Thread Cristian Stoica
This patch inverts one if condition to remove code block indentation. Several white space clean-ups follow. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/testmgr.c | 123 +++ 1 file changed, 60 insertions(+), 63

[PATCH 2/2] crypto: add TLS 1.0 test vectors for AES-CBC-HMAC-SHA1

2014-07-29 Thread Cristian Stoica
Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/tcrypt.c | 5 ++ crypto/testmgr.c | 41 --- crypto/testmgr.h | 217 +++ 3 files changed, 253 insertions(+), 10 deletions(-) diff --git a/crypto/tcrypt.c b

[PATCH 1/2] crypto: add support for TLS 1.0 record encryption

2014-07-29 Thread Cristian Stoica
(digest),cbc(cipher)). The cipher and hmac keys are wrapped in the same format used by authenc.c Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/Kconfig | 20 ++ crypto/Makefile | 1 + crypto/authenc.c | 5 +- crypto/tls.c | 528

[PATCH 0/2] Add TLS record layer encryption module

2014-07-29 Thread Cristian Stoica
on hw platforms that have acceleration for AES/SHA1 but do not have direct support for TLS record layer. (minor dependency on pending patch crypto: testmgr.c: white space fix-ups on test_aead) Cristian Stoica (2): crypto: add support for TLS 1.0 record encryption crypto: add TLS 1.0 test vectors

[PATCH] crypto: testmgr.c: white space fix-ups on test_aead

2014-07-28 Thread Cristian Stoica
This patch inverts two if conditions and allows removal of one tab-stop in their code-blocks. Only white-space clean-up follows. Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/testmgr.c | 498 +++ 1 file changed, 242

[PATCH v2] crypto: caam - fix memleak in caam_jr module

2014-07-03 Thread Cristian Stoica
This patch fixes a memory leak that appears when caam_jr module is unloaded. Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/jr.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam

[PATCH] crypto: caam - fix memleak in caam_jr module

2014-07-02 Thread Cristian Stoica
This patch fixes a memory leak that appears when caam_jr module is unloaded. Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- drivers/crypto/caam/jr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto

RE: [PATCH] crypto: remove unnecessary includes

2013-12-05 Thread Cristian Stoica
Hi Herbert, Your original response was terse and left me more puzzled. Do you have a sensible explanation why some includes should be kept in the source even they serve no purpose during the build? Thanks, Cristian S. Just because it compiles it doesn't meant that the files you removed

RE: [PATCH] crypto: remove unnecessary includes

2013-12-05 Thread Cristian Stoica
If you can't work out why authenc.c needs slab.h I don't think you should be submitting patches removing unnecessary header files. [] You left out kernel.h. I really hoped this would not be your answer. Yes, I'm an ignorant and yes, I ask questions. But if all you got is this type of

RE: [PATCH] crypto: remove unnecessary includes

2013-11-29 Thread Cristian Stoica
From what I could see there is nothing from those includes that is used inside authenc.c. The build passes without them. Cristian S. diff --git a/crypto/authenc.c b/crypto/authenc.c index 1875e70..7d4bfaa 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -17,11 +17,8 @@

RE: [PATCH] crypto: remove unnecessary includes

2013-11-29 Thread Cristian Stoica
On Fri, Nov 29, 2013 at 08:49:42AM +, Cristian Stoica wrote: From what I could see there is nothing from those includes that is used inside authenc.c. The build passes without them. Just because it compiles it doesn't meant that the files you removed are unnecessary. The only file

[PATCH] crypto: remove unnecessary includes

2013-11-28 Thread Cristian Stoica
Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/authenc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/crypto/authenc.c b/crypto/authenc.c index 1875e70..7d4bfaa 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c @@ -17,11 +17,8 @@ #include crypto/scatterwalk.h

[PATCH] crypto: remove double execution of the same test suite

2013-07-18 Thread Cristian Stoica
This patch removes redundant execution of the same test suite in cases where alg and driver variables are the same (e.g. when alg_test is called from tcrypt_test) Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/testmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] fix typo in comment

2013-06-28 Thread Cristian Stoica
Signed-off-by: Cristian Stoica cristian.sto...@freescale.com --- crypto/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/api.c b/crypto/api.c index 033a714..733e4ef 100644 --- a/crypto/api.c +++ b/crypto/api.c @@ -397,7 +397,7 @@ EXPORT_SYMBOL_GPL