Re: [PATCH v8 1/3] crypto: Key-agreement Protocol Primitives API (KPP)

2016-06-15 Thread Herbert Xu
On Tue, Jun 14, 2016 at 02:36:54PM +, Benedetto, Salvatore wrote: > > My very first patch used PKCS3 and there were some objections to that. > https://patchwork.kernel.org/patch/8311881/ > > Both Bluetooth or keyctl KEYCTL_DH_COMPUTE would have to first pack the > key to whatever format we

RE: [PATCH v8 1/3] crypto: Key-agreement Protocol Primitives API (KPP)

2016-06-14 Thread Benedetto, Salvatore
> -Original Message- > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Tuesday, June 14, 2016 12:35 PM > To: Benedetto, Salvatore <salvatore.benede...@intel.com> > Cc: linux-crypto@vger.kernel.org > Subject: Re: [PATCH v8 1/3] crypto: Key-agreement

Re: [PATCH v8 1/3] crypto: Key-agreement Protocol Primitives API (KPP)

2016-06-14 Thread Herbert Xu
On Mon, Jun 13, 2016 at 10:55:46PM +0100, Salvatore Benedetto wrote: > > +struct kpp_alg { > + int (*set_secret)(struct crypto_kpp *tfm, void *buffer); Sorry I think we need to change this. Leaving this with no type checking between the user and the driver is a recipe for disaster. I think

[PATCH v8 1/3] crypto: Key-agreement Protocol Primitives API (KPP)

2016-06-13 Thread Salvatore Benedetto
Add key-agreement protocol primitives (kpp) API which allows to implement primitives required by protocols such as DH and ECDH. The API is composed mainly by the following functions * set_secret() - It allows the user to set his secret, also referred to as his private key, along with the