Generate keys, encryption, and signatures using OpenSSL

Source: Internet
Author: User
Tags openssl rsa

OpenSSL genrsa-out RSAKEY.PEM 1024//Generate RSA key for 1024bit and save to Rsakey.pem where the key is not encrypted
OpenSSL genrsa-aes128-out rsakey.pem-passout pass:123456 1024//generates an RSA key for 1024bit, where the key is encrypted using AES128 and the key password is 123456

OpenSSL rsa-in rsakey.pem-out rsa_pubkey.pem-pubout//Enter a key file to extract the public key file where the output public key file is not encrypted
OpenSSL rsa-in rsakey.pem-out rsa_pubkey.pem-pubout-aes128-passin pass:123456//Use AES128 to encrypt the public key of the output with a key password of 123456

OpenSSL rsautl-in original.txt-out encrypt.txt-inkey rsa_pubkey.pem-pubin-encrypt-passin pass:123456//Using public key to Origi Nal.txt for encryption,-pubin means using the public key
OpenSSL rsautl-in encrypt.txt-out decrypt.txt-inkey rsakey.pem-decrypt-passin pass:123456//decryption of encrypted files

OpenSSL rsautl-in original.txt-out encrypt.txt-inkey rsakey.pem-pubin-encrypt-passin pass:123456//encrypt

OpenSSL rsautl-in original.txt-out sign.txt-inkey rsakey.pem-sign-passin pass:123456//sign
OpenSSL rsautl-in sign.txt-out verify.txt-inkey rsa_pubkey.pem-pubin-verify-passin pass:123456//verify

Generate keys, encryption, and signatures using OpenSSL

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.