<html><body>
<p><font size="2" face="sans-serif">Is there any other way to store private key and public key rather than in PEM format in file ?</font><br>
<br>
<font size="2" face="sans-serif">I mean API to store public and private key separately in memory.</font><br>
<br>
<font size="2" face="sans-serif">Thanks & Regards,<br>
Nayna Jain</font><br>
<br>
<img width="16" height="16" src="cid:1__=EABBF4A6DFE7C6118f9e8a93df938@in.ibm.com" border="0" alt="Inactive hide details for Matt Caswell ---04/28/2015 08:29:46 PM---On 28/04/15 15:39, Nayna Jain wrote: > Hi all,"><font size="2" color="#424282" face="sans-serif">Matt Caswell ---04/28/2015 08:29:46 PM---On 28/04/15 15:39, Nayna Jain wrote: > Hi all,</font><br>
<br>
<font size="1" color="#5F5F5F" face="sans-serif">From:      </font><font size="1" face="sans-serif">Matt Caswell <matt@openssl.org></font><br>
<font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">openssl-users@openssl.org</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Date:      </font><font size="1" face="sans-serif">04/28/2015 08:29 PM</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Subject:   </font><font size="1" face="sans-serif">Re: [openssl-users] Generating RSA PrivateKey and PublicKey     programmaticallly</font><br>
<font size="1" color="#5F5F5F" face="sans-serif">Sent by:   </font><font size="1" face="sans-serif">"openssl-users" <openssl-users-bounces@openssl.org></font><br>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2"><br>
<br>
On 28/04/15 15:39, Nayna Jain wrote:<br>
> Hi all,<br>
> <br>
> I want to generate public and private key pair programmatically.<br>
> <br>
> However, I have some basic questions.<br>
> <br>
> The key generated using RSA_generate_key_ex  is actually a key pair ,<br>
> having both private and public key.<br>
> NOw, if I want to extract the public and private keys separately from<br>
> this and want to store it in different privatekey.pem and publickey.pem<br>
> file, how can I do that programmatically.<br>
> <br>
> Also, when openssl genrsa commandline generates the privatekey.pem, does<br>
> it has only private key or also publickey<br>
<br>
Take a look at the various PEM_write*PUBKEY() and PEM_write*PrivateKey()<br>
functions here:<br>
<br>
</font></tt><tt><font size="2"><a href="https://www.openssl.org/docs/crypto/pem.html">https://www.openssl.org/docs/crypto/pem.html</a></font></tt><tt><font size="2"><br>
<br>
Matt<br>
<br>
_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: </font></tt><tt><font size="2"><a href="https://mta.openssl.org/mailman/listinfo/openssl-users">https://mta.openssl.org/mailman/listinfo/openssl-users</a></font></tt><tt><font size="2"><br>
<br>
</font></tt><br>
</body></html>