Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-09-07 Thread David Howells
Herbert Xu wrote: > > I am not in favor of just hacking in this split until the semantics are > > actually understood. As said, the right solution from my point of view is > > to remove setkey from akcipher and replace it with setkeyid instead. > > It's the keys

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-29 Thread Herbert Xu
Marcel Holtmann mar...@holtmann.org wrote: I am not in favor of just hacking in this split until the semantics are actually understood. As said, the right solution from my point of view is to remove setkey from akcipher and replace it with setkeyid instead. It's the keys system that should

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-29 Thread Tadeusz Struk
On 08/28/2015 11:55 PM, Herbert Xu wrote: I think having separate functions for setting public and private keys makes sense. So I'm going to proceed with this approach. Thanks everyone for your comments. -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-29 Thread Tadeusz Struk
On 08/28/2015 05:54 PM, Marcel Holtmann wrote: If you want to do this you should also update the existing RSA test vectors, because they are failing after this patch is applied. the test vectors have been failing no matter what. The crypto/rsakey.asn1 is actually broken as I explained in

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-28 Thread Stephan Mueller
Am Freitag, 28. August 2015, 07:28:58 schrieb Marcel Holtmann: Hi Marcel, The RSA algorithm provides two ASN.1 key types. One for RSA Private Key and another for RSA Public Key. Use these two already defined ASN.1 definitions instead of inventing a new one. Signed-off-by: Marcel Holtmann

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-28 Thread Marcel Holtmann
Hi Stephan, The RSA algorithm provides two ASN.1 key types. One for RSA Private Key and another for RSA Public Key. Use these two already defined ASN.1 definitions instead of inventing a new one. Signed-off-by: Marcel Holtmann mar...@holtmann.org --- crypto/Makefile | 9

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-28 Thread Tadeusz Struk
Hi Marcel, On 08/27/2015 10:28 PM, Marcel Holtmann wrote: +++ b/crypto/rsaprivatekey.asn1 @@ -0,0 +1,13 @@ +RSAPrivateKey ::= SEQUENCE { + version Version, + modulus INTEGER ({ rsa_get_n }),-- n + publicExponent INTEGER ({ rsa_get_e }),-- e +

Re: [PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-28 Thread Marcel Holtmann
Hi Tadeusz, +++ b/crypto/rsaprivatekey.asn1 @@ -0,0 +1,13 @@ +RSAPrivateKey ::= SEQUENCE { +version Version, +modulus INTEGER ({ rsa_get_n }),-- n +publicExponent INTEGER ({ rsa_get_e }),-- e +privateExponent INTEGER ({ rsa_get_d }),

[PATCH] crypto: Fix ASN.1 key handling for RSA akcipher

2015-08-27 Thread Marcel Holtmann
The RSA algorithm provides two ASN.1 key types. One for RSA Private Key and another for RSA Public Key. Use these two already defined ASN.1 definitions instead of inventing a new one. Signed-off-by: Marcel Holtmann mar...@holtmann.org --- crypto/Makefile | 9 ++---