Name

rsautl

Synopsis

The rsautl command is used to utilize RSA keys for encryption and signing. It can be used to encrypt and decrypt data, as well as sign and verify signatures.

Options

-in filename

Specify the name of a file from which data will be read. If this option is omitted, stdin will be used.

-inkey filename

Specify the name of a file containing the public or private key to use. By default, the file should contain a private key unless the pubin or certin option is specified.

-pubin

Indicate that the file specified by the inkey option contains a public key.

-certin

Indicate that the file specified by the inkey option contains a certificate, which contains a public key.

-out filename

Specify the name of a file to which data will be written. If this option is omitted, stdout will be used.

-hexdump

Cause the output data to be output in a hexdump format.

-asn1parse

Cause the output data to be ASN.1-parsed and output in the same format as the one that the asn1parse command emits.

-sign

Cause the input data to be signed and the output to be the result. Signing requires a private key. Note that because signing uses the RSA algorithm directly, only small pieces of data can be signed.

-verify

Cause the input data to be interpreted as a signature and verified. The output is the original input data that was signed. Verifying requires the public key matching the private key that was used to sign the data.

-encrypt

Cause the input data to be encrypted. Encryption requires a public ...

Get Network Security with OpenSSL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.