[PATCH] crypto: kpp, (ec)dh - fix typos

2017-05-03 Thread Tudor-Dan Ambarus
Signed-off-by: Tudor-Dan Ambarus --- crypto/dh.c | 4 ++-- crypto/dh_helper.c| 4 ++-- crypto/ecdh.c | 4 ++-- crypto/ecdh_helper.c | 4 ++-- include/crypto/dh.h | 4 ++-- include/crypto/ecdh.h | 4 ++-- include/crypto/kpp.h | 4 ++-- 7 files changed, 14 insertions

provide DMA services in drivers/crypto

2016-10-19 Thread Tudor-Dan Ambarus
Hi, Herbert, CAAM has the ability to provide DMA services. This is helpful for platforms that don't have a dedicated DMA hardware block. In this particular example, caam being a crypto accelerator at its fundamentals, where is recommended to add a caam-dma engine implementation, in drivers/dma

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

2016-07-05 Thread Tudor-Dan Ambarus
> Please look at your patch. It's broken, you're including > > +#include "rsapubkey-asn1.h" > +#include "rsaprivkey-asn1.h" > > which no longer exist. Right, the inclusions, together with: +ccflags-y += -I$(srctree)/crypto are leftovers. I will submit a v10 patch. These files (from crypto/)

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

2016-07-04 Thread Tudor-Dan Ambarus
> Perhaps you have a dirty tree that still has the asn header file > in the caam subdirectory? > > I don't see how this can possibly work on a clean tree since you > got rid of all the ASN stuff from the caam driver. The tree looks good. I made 'make mrproper' and 'make clean' before building t

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

2016-07-04 Thread Tudor-Dan Ambarus
Hi Herbert, > Sorry, but this doesn't build: > > CC [M] drivers/crypto/caam/caampkc.o > ../drivers/crypto/caam/caampkc.c:17:28: fatal error: rsapubkey-asn1.h: No > such file or directory > compilation terminated. I can't reproduce it. I tried on powerpc, arm and x86 (even if caam is not prese

RE: [PATCH v5] crypto: rsa - return raw integers for the ASN.1 parser

2016-06-14 Thread Tudor-Dan Ambarus
Hi Stephan, > But then I need to refine my question: isn't rsa_parse_priv_key allocating > the > MPIs (at least rsa_parse_priv_key seems to hint to that considering the > error > code path)? So, shouldn't the MPIs be freed here with free_mpis()? This > would > apply to parse_pub_key too. rsa_pars

RE: [PATCH v3] crypto: rsa - return raw integers for the ASN.1 parser

2016-06-08 Thread Tudor-Dan Ambarus
Hi Stephan, > > int rsa_get_n(void *context, size_t hdrlen, unsigned char tag, > > const void *value, size_t vlen) > > { > > struct rsa_key *key = context; > > + const u8 *ptr = value; > > + int ret; > > > > - key->n = mpi_read_raw_data(value, vlen); > > + while (!*ptr && v

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

2016-05-24 Thread Tudor-Dan Ambarus
Hi Stephan, > > > as I am looking into the RSA countermeasures, I am wondering how much > of > > > countermeasures are actually applied inside hardware implementations. > > > > Please point me to the reference RSA countermeasures so that we have > > a common point of start. > > As the entire MPI

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

2016-05-23 Thread Tudor-Dan Ambarus
Hi Stephan, > as I am looking into the RSA countermeasures, I am wondering how much of > countermeasures are actually applied inside hardware implementations. Please point me to the reference RSA countermeasures so that we have a common point of start. Thanks, ta -- To unsubscribe from this list

RE: [PATCH v2 6/8] crypto: caam - handle core endianness != caam endianness

2016-05-16 Thread Tudor-Dan Ambarus
> There are SoCs like LS1043A where CAAM endianness (BE) does not match > the default endianness of the core (LE). > Moreover, there are requirements for the driver to handle cases like > CPU_BIG_ENDIAN=y on ARM-based SoCs. > This requires for a complete rewrite of the I/O accessors. > > PPC-speci

RE: [PATCH] crypto: rsa - return raw integer for the ASN.1 parser

2016-05-11 Thread Tudor-Dan Ambarus
Hi Herbert, > On Fri, Apr 29, 2016 at 03:51:46PM +0300, Tudor Ambarus wrote: > > > > struct rsa_key { > > + u8 *n; > > + u8 *e; > > + u8 *d; > > + dma_addr_t dma_n; > > + dma_addr_t dma_e; > > + dma_addr_t dma_d; > > + size_t n_sz; > > + size_t e_sz; > > + bool coherent; > > +

RE: [PATCH] crypto: rsa - return raw integer for the ASN.1 parser

2016-05-05 Thread Tudor-Dan Ambarus
c: linux-crypto@vger.kernel.org; Tudor-Dan Ambarus > Subject: [PATCH] crypto: rsa - return raw integer for the ASN.1 parser > > Return the raw integer with no other processing. > The scope is to have only one ANS.1 parser for the RSA keys. > > Update the RSA software implementation so tha

RE: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-24 Thread Tudor-Dan Ambarus
Hi Herbert, > > On Fri, Apr 15, 2016 at 02:32:42PM +, Tudor-Dan Ambarus wrote: > > > > On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > > > > This approach has the advantage that users can select specific > > > > > parser

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

2016-04-18 Thread Tudor-Dan Ambarus
Hi Stephan, > Am Mittwoch, 6. April 2016, 16:37:56 schrieb Tudor Ambarus: > > > +static size_t scatterwalk_skip_zeros(struct scatter_walk *walk, size_t > > nbytes) +{ > > Do you really want to keep that function after Herbert mentioned we should > leave the zeros for the RSA operation? Or asked

RE: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Tudor-Dan Ambarus
> On Fri, Apr 15, 2016 at 02:32:42PM +0000, Tudor-Dan Ambarus wrote: > > > On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > > > This approach has the advantage that users can select specific > > > > parser actions by using a general pars

RE: [PATCH v3 1/3] crypto: rsa - generalize ASN.1 sequences

2016-04-15 Thread Tudor-Dan Ambarus
> On Wed, Apr 06, 2016 at 04:37:04PM +0300, Tudor Ambarus wrote: > > This approach has the advantage that users can select specific > > parser actions by using a general parser with function pointers > > to specific actions. > > I don't understand why we need different parsing functions in the > f

RE: [PATCH v3 2/3] crypto: rsa_helper - add raw integer parser actions

2016-04-14 Thread Tudor-Dan Ambarus
Hi Stephan, I was out of office, sorry for the delay. > Am Mittwoch, 6. April 2016, 16:37:05 schrieb Tudor Ambarus: > > > +int rsa_check_key_length(unsigned int len) > > +{ > > + switch (len) { > > + case 512: > > + case 1024: > > + case 1536: > > + case 2048: > > + case 3072: > > +

RE: [PATCH 02/10] crypto: rsa_helper - add raw integer parser actions

2016-03-21 Thread Tudor-Dan Ambarus
Hi Stephan, > -Original Message- > From: Stephan Mueller [mailto:smuel...@chronox.de] > Sent: Friday, March 18, 2016 9:47 PM > To: Tudor-Dan Ambarus > Cc: herb...@gondor.apana.org.au; tadeusz.st...@intel.com; linux- > cry...@vger.kernel.org; Horia Ioan Geanta Neag >

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

2016-03-21 Thread Tudor-Dan Ambarus
Hi Stephan, > -Original Message- > From: Stephan Mueller [mailto:smuel...@chronox.de] > Sent: Saturday, March 19, 2016 6:59 PM > To: Tudor-Dan Ambarus > Cc: herb...@gondor.apana.org.au; tadeusz.st...@intel.com; linux- > cry...@vger.kernel.org; Horia Ioan Geanta Neag >

RE: [PATCH 07/10] crypto: qat - remove duplicate ASN.1 parser

2016-03-21 Thread Tudor-Dan Ambarus
> -Original Message- > From: Tadeusz Struk [mailto:tadeusz.st...@intel.com] > Sent: Sunday, March 20, 2016 4:56 PM > To: Tudor-Dan Ambarus; herb...@gondor.apana.org.au > Cc: linux-crypto@vger.kernel.org; smuel...@chronox.de; Horia Ioan Geanta > Neag > Subject: Re:

RE: [PATCH 01/10] crypto: rsa - generalize ASN.1 sequences

2016-03-21 Thread Tudor-Dan Ambarus
Hi Tadeusz, > -Original Message- > From: Tadeusz Struk [mailto:tadeusz.st...@intel.com] > Sent: Sunday, March 20, 2016 4:54 PM > To: Tudor-Dan Ambarus; herb...@gondor.apana.org.au > Cc: linux-crypto@vger.kernel.org; smuel...@chronox.de; Horia Ioan Geanta > Neag > Subj

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

2016-03-01 Thread Tudor-Dan Ambarus
Hi Herbert, > >> -Original Message- > >> >+++ b/drivers/crypto/caam/caam_rsaprivkey.asn1 > >> >@@ -0,0 +1,11 @@ > >> >+RsaPrivKey ::= SEQUENCE { > >> >+version INTEGER, > >> >+n INTEGER ({ caam_rsa_get_n }), > >> >+e INTEGER ({ caam_rsa_get_e

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

2016-02-22 Thread Tudor-Dan Ambarus
Hi Stephan, > -Original Message- > >+++ b/drivers/crypto/caam/caam_rsaprivkey.asn1 > >@@ -0,0 +1,11 @@ > >+RsaPrivKey ::= SEQUENCE { > >+version INTEGER, > >+n INTEGER ({ caam_rsa_get_n }), > >+e INTEGER ({ caam_rsa_get_e }), > >+d

RE: RSA decryption output length

2016-02-09 Thread Tudor-Dan Ambarus
, 2016 7:46 PM To: Tudor-Dan Ambarus; linux-crypto@vger.kernel.org Subject: Re: RSA decryption output length Hi Tudor-Dan, On 02/05/2016 07:25 AM, Tudor-Dan Ambarus wrote: > I see that in qat, if the RSA decryption output data has the first octets of > value zero, you skip them, actualize the d