Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-22 Thread Herbert Xu
On Wed, Jun 22, 2016 at 10:06:32AM +, Benedetto, Salvatore wrote: > > It is pointless because it will only be used for the testmanager. > I can merge the test functions but I'll still have two set_secret functions > based on the alg value. Would that be enough for you? I have made myself perfe

RE: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-22 Thread Benedetto, Salvatore
> -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Wednesday, June 22, 2016 11:04 AM > To: Benedetto, Salvatore > Cc: linux-crypto@vger.kernel.org > Subject: Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation > >

Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-22 Thread Herbert Xu
On Wed, Jun 22, 2016 at 08:18:42AM +, Benedetto, Salvatore wrote: > > If I have to pack the secret into a bytestream, where do you expect the > endianness > of the sizes to be handled? If I understood you correctly I'll pack them in > little endian, > but when decoding I have to take that int

RE: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-22 Thread Benedetto, Salvatore
Hi Herbert, > -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Wednesday, June 22, 2016 7:41 AM > To: Benedetto, Salvatore > Cc: linux-crypto@vger.kernel.org > Subject: Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation &

Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-21 Thread Herbert Xu
On Wed, Jun 22, 2016 at 06:37:50AM +, Benedetto, Salvatore wrote: > > Can you explain me the benefit in doing so? The less code we have the better. Most of our algorithm types have a single test function, I have seen no reason why kpp should be different. akcipher has been an anomaly and I'm

RE: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-21 Thread Benedetto, Salvatore
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of Herbert Xu > Sent: Wednesday, June 22, 2016 1:51 AM > To: Benedetto, Salvatore > Cc: linux-crypto@vger.kernel.org > Subject: Re: [PATCH v10 2

Re: [PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-21 Thread Herbert Xu
On Tue, Jun 21, 2016 at 09:45:30PM +0100, Salvatore Benedetto wrote: > > + > +static int test_dh(struct crypto_kpp *tfm, struct kpp_testvec_dh *vecs, > +unsigned int tcount) > +{ > + int ret, i; Please make the kpp test function generic. I'm trying to kill the RSA-specific tes

[PATCH v10 2/3] crypto: kpp - Add DH software implementation

2016-06-21 Thread Salvatore Benedetto
* Implement MPI based Diffie-Hellman under kpp API * Test provided uses data generad by OpenSSL Signed-off-by: Salvatore Benedetto --- crypto/Kconfig | 8 ++ crypto/Makefile | 4 + crypto/dh.c | 189 ++ crypto/dh_helper.c |