rsautl
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.
Specify the name of a file from which data will be read. If this
option is omitted, stdin will be used.
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.
Indicate that the file specified by the inkey
option contains a public key.
Indicate that the file specified by the inkey
option contains a certificate, which contains a public key.
Specify the name of a file to which data will be written. If this
option is omitted, stdout will be used.
Cause the output data to be output in a hexdump format.
Cause the output data to be ASN.1-parsed and output in the same
format as the one that the asn1parse command
emits.
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.
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.
Cause the input data to be encrypted. Encryption requires a public key.
Cause the input data to be decrypted. Decryption requires that the private key match the public key that was used to encrypt the data.
Specify the type of padding to use: PKCS#1 v1.5, PKCS#1 OAEP, SSLv2-compatible, or no padding at all. The default is to use PKCS#1 v1.5 padding.