Use the mac terminal to generate the RSA private key and public key file, and the mac terminal to generate the rsa

Source: Internet
Author: User

Use the mac terminal to generate the RSA private key and public key file, and the mac terminal to generate the rsa

89 :~ Zhangwenquan $

89 :~ Zhangwenquan $ openssl

OpenSSL> genrsa-out rsa_private_key.pem 1024

Generating RSA private key, 1024 bit long modulus

...

...

E is 65537 (0x10001)

OpenSSL> pkcs8-topk8-inform PEM-in rsa_private_key.pem-outform PEM-nocrypt

----- Begin private key -----

MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALldSA5HtPvyhEUK

A6M + Cn2jwUQx1lekTK0gM7jSFhzKhcY7ADeVhL + AjGtnYvlGY + npOEM1DqJPBBiu

CbPkyBtPHErZRjN0r0rZiqS0AY7j/EvG656W8S + rhN59AWtV3zuCF0C6pOWnUiMr

Bytes

Oaemwtz%25yva + g4eqRhUxAYNZmsRhzh8JrXv +/aSHlj60uPC + ZhMfGpwzAYo1

I0KR + dQT5uoP1nhqVZev + cxicabj1_kczbvdifz1txl8n1_1ulssnltxdn68qvwh

/WSz/7ppGdKrgVIM4QJBAOS36NuVMsut6iPxLmtOpRz + VTZj8jS1yXz0/sv + WIoj

ZcBabuMTVixMvuK49dBZTTOd5AXCizzKDx4qdD/vdukcqqdpeyyjjtpcie rsosyok

+ Response

TxKlAkAqyGgLYw48YUzR6lR3iB + Em + KOqQVubK7C7AUZXXtsY6QiHght + 3j8EmMG

F/Snapshot

WhBsfyMqU6GHTgEWR7hNEo2A9mhNUDzzUjgPtFExbrZH8uYqthVZAkB2/TLnvwDM

Bytes

FELfsTQfy0Dz

----- End private key -----

OpenSSL> rsa-in rsa_private_key.pem-pubout-out rsa_public_key.pem

Writing RSA key

OpenSSL>

 

Red indicates the command to be entered.

 

 

 

The red box is in pkcs8 format. Remember to copy it and use it in the background.

 

 

Go to the folder to find the pem Certificate

 

 

 

 

 

This is the pem file to be generated.

 

Related Article

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.