OpenSSL RSA Key Utilities
Jump to navigation
Jump to search
RSA Keys PEM-formatted
RSA PEM-formatted Key Information
- Extension(s) .key, .pem
- PEM encoded RSA private key is a format that stores an RSA private key, for use with cryptographic systems such as SSL.
- A key file is plain text, with base64-encoded payload data. It contains a line that reads "-----BEGIN RSA PRIVATE KEY-----".
RSA PEM-formatted Key Commands
- View the contents of a key file.
- # openssl rsa -noout -text -in <hostname>.key
- Generate a new private key.
- # openssl genrsa -out <hostname>.key 2048
- Add a password to an existing private key.
- # openssl rsa -des3 -in <hostname-unprotected>.key -out <hostname-protected>.key
- Remove a password from an existing private key.
- # openssl rsa -in <hostname-protected>.key -out <hostname-unprotected>.key
RSA Keys DER-formatted
RSA DER-formateed Key Information
- Extension(s) .key
- DER encoded RSA private key is an RSA private key format that stores the same information as PEM encoded RSA private key, but encoded in DER format instead of PEM format.
RSA DER-formatted Key Information
- View the contents of a DER-formatted key.
- # openssl rsa -noout -text -inform der -in <hostname-der>.key
- Convert a DER-formatted key to a PEM-formatted key.
- # openssl rsa -inform der-in <hostname-der>.key -out <hostname-pem>.key