Discussion:
RSA key generation and writing int to text file.
krishnamurthy santhanam
2010-09-06 16:40:28 UTC
Permalink
Hi ,

RSA *rsa;
rsa=RSA_generate_key(2048,RSA_F4,NULL,NULL);


I need to write public and private key into text file ...is it possible
using BN?

any suggestion and examples would be great helpful for me.

thanks,
kris
Dave Thompson
2010-09-07 22:29:58 UTC
Permalink
santhanam
Sent: Monday, 06 September, 2010 12:40
I need to write [RSA] public and private key into text file
...is it possible using BN?
Yes, but for supported formats you don't need to;
see reply to your next message.

If you need to write some other format, it's possible
but more complicated. As an example, 2009-06-20 for
someone needing openssh key format, Mounir Idrassi posted
I have already posted to this list a C code of a program that converts
from an OpenSSL public key to an OpenSSH public key.
http://www.idrix.fr/Root/Samples/pubkey2ssh.c
openssh-public is a mostly-base64 text format.
(openssh-private is the openssl PEM format exactly.)



______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users-MCmKBN63+***@public.gmane.org
Automated List Manager majordomo-MCmKBN63+***@public.gmane.org
Loading...