rsa
The rsa
command is used modify RSA private keys
or examine their contents. The command may be used to remove
encryption from a private key, add it to a private key, or change the
encryption that is used on a private key. The command can also be
used to compute a public key from a private key.
Specify the name of a file from which an RSA private key will be
read. If no file is specified, stdin is used.
Specify the format—DER, NET, or PEM—of the key that is read as input. If this option is omitted, the default format is PEM.
Specify the name of a file to which the output from this command will
be written. If this option is omitted, stdout will
be used.
Specify the format—DER, NET or PEM—of the key that is written. If this option is omitted, the default format is PEM.
Cause the input key to be interpreted as a public key.
Cause the output key to be interpreted as a public key.
Specify the password to use to decrypt the input key. This option follows the password and passphrase guidelines outlined in Chapter 2.
Specify the password to use to encrypt the output key. This option follows the password and passphrase guidelines outlined in Chapter 2.
Specify the cipher to use to encrypt the private key. If this option is omitted, the private key that is written out by this command will not be encrypted.
Cause the output of the key in DER or PEM format to be suppressed.
Cause the input key, public or private, to be output in a human-readable form.
Cause the modulus of the public key to be written to the output destination.
Specify this option to check the consistency of an RSA private key.
Cause a modified form of the NET format used by some versions of Microsoft IIS and old Netscape servers to be used for the output key. This format is not very secure, so it should be used only if necessary.
When producing private keys using the sgckey
option, the passout option is currently ignored.
The command will not read some forms of an unmodified NET format
private key because they contain additional data. To use these keys
with this command, try editing the key with a binary editor and
removing all of the data in the file prior to the byte sequence 0x30,
0x82. Do not remove this byte sequence; it should be included in the
resulting file.