Openssl rsautl Command

Source: Internet
Author: User

First, Introduction

RSAUTL instruction can use RSA algorithm signature, verify identity, encrypt/decrypt data

Second, the grammar

OpenSSL rsautl [-infilefile] [-passin arg] [-keyform pem| Der|net] [-pubin] [-certin][-asn1parse] [-hexdump] [-raw] [-OAEP] [-SSL] [-PKCS] [-x931] [-sign] [-verify][- Encrypt] [-decrypt] [-rev] [-engine E]

Options

-inch fileInputfile-outfileOutputfile-inkeyfileinput Key-keyform ARG private key format-default PEM-Pubin input is a RSA public-certin input is a certificate carrying an RSA public key-SSL Use SSL v2 padding-raw use no padding-PKCS Use pkcs#1V1.5padding (default)-OAEP Use pkcs#1OAEP-Sign sign with private key-Verify verify with Public key-Encrypt encrypt with public key-decrypt decrypt with private key-hexdump hex Dump output-engine e Use engine E, possibly a hardware device.-passin Arg pass phrase source

Third, examples

1. Signature Verification

OpenSSL Rsautl-sign-inkey Prikey.pem-passin pass:123456 - in Test.txt-outTest_sign.msgopenssl R Sautl-verify-inkey pubkey.pem-pubin-passin pass:123456-in test_sign.msg

2. Encrypt and decrypt

OpenSSL rsautl-encrypt-pubin-inkey Pubkey.pem- in Test.txt--decrypt-inkey prikey.pem-passin pass:< c5>123456 - in Test_cipher.txt

Reference: http://blog.csdn.net/as3luyuan123/article/details/16812011

Openssl rsautl Command

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.