Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-04 Thread Herbert Xu
On Tue, Aug 04, 2015 at 09:33:27PM -0700, Marcel Holtmann wrote: > > I think it actually is the correct interface. And it will still stay a purely > algorithmic interface. It is just that the algorithm is bound to specific > hardware with a specific key. I really do not understand your distinctio

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-04 Thread Marcel Holtmann
Hi Herbert, >> We already have an interface that can handle asymmetric keys and it is easy >> to extend with new key formats and key types. So lets use that. I can >> clearly see that after RSA, we get DSA, ECDH etc. So having a simple way to >> handle these key formats is a good idea. That inf

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-04 Thread Herbert Xu
On Tue, Aug 04, 2015 at 09:02:36PM -0700, Marcel Holtmann wrote: > > We already have an interface that can handle asymmetric keys and it is easy > to extend with new key formats and key types. So lets use that. I can clearly > see that after RSA, we get DSA, ECDH etc. So having a simple way to ha

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-04 Thread Marcel Holtmann
Hi Herbert, >> RSA Private Key is n + e + d (including 6 other fields). RSA Public Key is n >> + e (no other fields). >> >> So for RSA you would make setkey to take RSA Private Key and setpubkey to >> take RSA Public Key. Meaning you only have to use one of them since if you >> have the privat

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-04 Thread Herbert Xu
On Mon, Aug 03, 2015 at 12:25:31AM -0700, Marcel Holtmann wrote: > > RSA Private Key is n + e + d (including 6 other fields). RSA Public Key is n > + e (no other fields). > > So for RSA you would make setkey to take RSA Private Key and setpubkey to > take RSA Public Key. Meaning you only have t

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-03 Thread Marcel Holtmann
Hi Stephan, I think we need to split the akcipher_alg setkey callback into a setkey and setpubkey. diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h index 69d163e39101..ca93952b6d19 100644 --- a/include/crypto/akcipher.h +++ b/include/crypt

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-03 Thread Stephan Mueller
Am Montag, 3. August 2015, 00:03:03 schrieb Marcel Holtmann: Hi Marcel, > Hi Stephan, > > >> I think we need to split the akcipher_alg setkey callback into a setkey > >> and > >> setpubkey. > >> > >> diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h > >> index 69d163e39101..ca9

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-03 Thread Marcel Holtmann
Hi Stephan, >> I think we need to split the akcipher_alg setkey callback into a setkey and >> setpubkey. >> >> diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h >> index 69d163e39101..ca93952b6d19 100644 >> --- a/include/crypto/akcipher.h >> +++ b/include/crypto/akcipher.h >> @@

Re: Proposal for adding setpubkey callback to akcipher_alg

2015-08-02 Thread Stephan Mueller
Am Sonntag, 2. August 2015, 22:28:33 schrieb Marcel Holtmann: Hi Marcel, >Hi Tadeusz, > >I think we need to split the akcipher_alg setkey callback into a setkey and >setpubkey. > >diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h >index 69d163e39101..ca93952b6d19 100644 >--- a/in

Proposal for adding setpubkey callback to akcipher_alg

2015-08-02 Thread Marcel Holtmann
Hi Tadeusz, I think we need to split the akcipher_alg setkey callback into a setkey and setpubkey. diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h index 69d163e39101..ca93952b6d19 100644 --- a/include/crypto/akcipher.h +++ b/include/crypto/akcipher.h @@ -91,6 +91,8 @@ struct a