Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-04 Thread Herbert Xu
On Mon, May 04, 2015 at 12:26:40PM -0700, Tadeusz Struk wrote: > > So in this case isn't RNG a hash algorithm as well? No RNG is at 12 and HASH is 8-11. > Anyway will something like this be ok with you: This is unnecesary. You can use 13/14 (d/e). Cheers, -- Email: Herbert Xu Home Page:

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-04 Thread Tadeusz Struk
On 05/02/2015 05:07 PM, Herbert Xu wrote: > >> #define CRYPTO_ALG_TYPE_AHASH0x000a > > >> > +#define CRYPTO_ALG_TYPE_PKE 0x000b > > >> > #define CRYPTO_ALG_TYPE_RNG 0x000c >>> > > Will filling a hole cause a problem with

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-04 Thread Tadeusz Struk
On 05/02/2015 05:07 PM, Herbert Xu wrote: #define CRYPTO_ALG_TYPE_AHASH0x000a +#define CRYPTO_ALG_TYPE_PKE 0x000b #define CRYPTO_ALG_TYPE_RNG 0x000c Will filling a hole cause a problem with something that got obsoleted? I

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-04 Thread Herbert Xu
On Mon, May 04, 2015 at 12:26:40PM -0700, Tadeusz Struk wrote: So in this case isn't RNG a hash algorithm as well? No RNG is at 12 and HASH is 8-11. Anyway will something like this be ok with you: This is unnecesary. You can use 13/14 (d/e). Cheers, -- Email: Herbert Xu

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-02 Thread Herbert Xu
On Fri, May 01, 2015 at 11:17:44AM -0700, Tadeusz Struk wrote: > > I'm fine with pkey. Herbert do you have preference with regards 'algo' vs > 'alg'? For interfaces with the crypto API alg should be used otherwise you can use algo or whatever you like. > >> #define CRYPTO_ALG_TYPE_AHASH

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-02 Thread Herbert Xu
On Fri, May 01, 2015 at 11:17:44AM -0700, Tadeusz Struk wrote: I'm fine with pkey. Herbert do you have preference with regards 'algo' vs 'alg'? For interfaces with the crypto API alg should be used otherwise you can use algo or whatever you like. #define CRYPTO_ALG_TYPE_AHASH

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Tadeusz Struk
On 05/01/2015 09:04 AM, David Howells wrote: >> +config CRYPTO_PKE > I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather > than alg where possible - this will have more consistency with what we have > now. > > I understand, however, that in core crypto code, 'alg' is

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Tadeusz Struk
Hi Stephan, On 05/01/2015 12:24 AM, Stephan Mueller wrote: >> +struct public_key; >> >+struct public_key_signature; > Wouldn't it make sense to move the struct definitions here and have them > documented? I'm not sure if they belong here. I think we can add some documentation without moving

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread David Howells
Tadeusz Struk wrote: > +config CRYPTO_PKE I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather than alg where possible - this will have more consistency with what we have now. I understand, however, that in core crypto code, 'alg' is used. + seq_printf(m, "can

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Stephan Mueller
Am Donnerstag, 30. April 2015, 15:36:52 schrieb Tadeusz Struk: Hi Tadeusz, >Add Public Key Encryption API. > >Signed-off-by: Tadeusz Struk >--- > crypto/Kconfig |6 + > crypto/Makefile|1 > crypto/crypto_user.c | 23 + > crypto/pke.c | 114

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Stephan Mueller
Am Donnerstag, 30. April 2015, 15:36:52 schrieb Tadeusz Struk: Hi Tadeusz, Add Public Key Encryption API. Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com --- crypto/Kconfig |6 + crypto/Makefile|1 crypto/crypto_user.c | 23 + crypto/pke.c

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Tadeusz Struk
Hi Stephan, On 05/01/2015 12:24 AM, Stephan Mueller wrote: +struct public_key; +struct public_key_signature; Wouldn't it make sense to move the struct definitions here and have them documented? I'm not sure if they belong here. I think we can add some documentation without moving them.

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread David Howells
Tadeusz Struk tadeusz.st...@intel.com wrote: +config CRYPTO_PKE I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather than alg where possible - this will have more consistency with what we have now. I understand, however, that in core crypto code, 'alg' is used. +

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-05-01 Thread Tadeusz Struk
On 05/01/2015 09:04 AM, David Howells wrote: +config CRYPTO_PKE I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather than alg where possible - this will have more consistency with what we have now. I understand, however, that in core crypto code, 'alg' is used. I'm

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Tadeusz Struk
On 04/30/2015 03:43 PM, Herbert Xu wrote: > Please remodel it after pcompress or the newly converted rng type. > > This union stuff has been obsolete since 2008 and it's time for > it to die. Ok, I didn't realize. Will send v2 shortly. Thanks -- To unsubscribe from this list: send the line

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Herbert Xu
On Thu, Apr 30, 2015 at 03:36:52PM -0700, Tadeusz Struk wrote: > > +struct pke_alg { > + int (*sign)(struct pke_request *pkereq); > + int (*verify)(struct pke_request *pkereq); > + int (*encrypt)(struct pke_request *pkereq); > + int (*decrypt)(struct pke_request *pkereq); > + > +

[PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Tadeusz Struk
Add Public Key Encryption API. Signed-off-by: Tadeusz Struk --- crypto/Kconfig |6 + crypto/Makefile|1 crypto/crypto_user.c | 23 + crypto/pke.c | 114 ++ include/crypto/algapi.h|6 +

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Herbert Xu
On Thu, Apr 30, 2015 at 03:36:52PM -0700, Tadeusz Struk wrote: +struct pke_alg { + int (*sign)(struct pke_request *pkereq); + int (*verify)(struct pke_request *pkereq); + int (*encrypt)(struct pke_request *pkereq); + int (*decrypt)(struct pke_request *pkereq); + + u8

[PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Tadeusz Struk
Add Public Key Encryption API. Signed-off-by: Tadeusz Struk tadeusz.st...@intel.com --- crypto/Kconfig |6 + crypto/Makefile|1 crypto/crypto_user.c | 23 + crypto/pke.c | 114 ++ include/crypto/algapi.h|

Re: [PATCH RFC 1/2] crypto: add PKE API

2015-04-30 Thread Tadeusz Struk
On 04/30/2015 03:43 PM, Herbert Xu wrote: Please remodel it after pcompress or the newly converted rng type. This union stuff has been obsolete since 2008 and it's time for it to die. Ok, I didn't realize. Will send v2 shortly. Thanks -- To unsubscribe from this list: send the line