Steps for OpenSSL to generate private key keys

Source: Internet
Author: User
Tags install openssl

This article refer to http://blog.csdn.net/scape1989/article/details/18959657

If you want to use OpenSSL on Ubuntu, you need to install it first, the command is as follows:

sudo apt-get install OpenSSL

You can use OpenSSL when the installation is complete.

The first step is to enter OpenSSL's interface and enter OpenSSL at the command line;

1) Generate RSA private key:

Genrsa-out RSA_PRIVATE_KEY.PEM 1024

At this point we can see the Rsa_private_key.pem file under the current path.

2) Convert RSA private key to PKCS8 format
Input command Pkcs8-topk8-inform pem-in rsa_private_key.pem-outform pem–nocrypt, and enter

3) Generate RSA public key

Enter command rsa-in rsa_private_key.pem-pubout-out Rsa_public_key.pem, and enter,

At this point, we can see a file named Rsa_public_key.pem, open it, you can see-----begin public Key-----start,
-----End of the public key-----The string with no newline, this is the key.

Steps for OpenSSL to generate private key keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.