Generating RSA PrivateKey and PublicKey programmaticallly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 28/04/15 15:39, Nayna Jain wrote:
> Hi all,
> 
> I want to generate public and private key pair programmatically.
> 
> However, I have some basic questions.
> 
> The key generated using RSA_generate_key_ex  is actually a key pair ,
> having both private and public key.
> NOw, if I want to extract the public and private keys separately from
> this and want to store it in different privatekey.pem and publickey.pem
> file, how can I do that programmatically.
> 
> Also, when openssl genrsa commandline generates the privatekey.pem, does
> it has only private key or also publickey

Take a look at the various PEM_write*PUBKEY() and PEM_write*PrivateKey()
functions here:

https://www.openssl.org/docs/crypto/pem.html

Matt



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux