Thread (11 messages) 11 messages, 3 authors, 2015-08-03

Re: Limited usefulness of RSA set key function

From: Tadeusz Struk <hidden>
Date: 2015-08-03 17:12:07

Hi Marcel,
On 08/03/2015 12:30 AM, Marcel Holtmann wrote:
as you can clearly see. There are two formats defined here. There is no single ASN.1 structure that can decode both of these.

It is what it is, RSA Public Key and RSA Private Key formats are two different key formats. And OpenSSL also treats it like this. You can extract the public key from a private key (same way you can extract it from a certificate), but you can not create a private key structure that only contains the public key.

For RSA we need to support the two formats as listed above. To make this really easy from an API point of view, I would have setkey and setpubkey function. And also expose them as ALG_SET_KEY and ALG_SET_PUBKEY socket options for AF_ALG.
I'll have a look what will be the easiest way to get the openSSL generated & unmodified private key working.
Thanks,
T
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help