How to generate Key-pair using OpenSSL

RSA is one of the most well-known security infrastructure based on PKI. I'm talking about how to generate a key-pair to be used in applications.

Private key:

openssl genrsa -out rsakey.pem 2048

Public key:

openssl rsa -in rsakey.pem -out rsapub.pem -pubout

Note that no encription here because I want to use it in my program. It is not reasonable to enter the passphrase everytime it executed. For more example, read [here].

Tags: ,

Post new comment