info > openssl-rsa(1)

📝 NAME

openssl-rsa - RSA key processing command

🚀 Quick Reference

Use CaseCommandDescription
Remove pass phrase from keyopenssl rsa -in key.pem -out keyout.pemDecrypts and writes key without encryption
Encrypt private key with triple DESopenssl rsa -in key.pem -des3 -out keyout.pemAdds passphrase protection
Convert PEM to DER formatopenssl rsa -in key.pem -outform DER -out keyout.derChanges output encoding
Print key components (text only)openssl rsa -in key.pem -text -nooutDisplays modulus, exponents, etc.
Output public key from private keyopenssl rsa -in key.pem -pubout -out pubkey.pemExtracts public part
Output public key in RSAPublicKey formatopenssl rsa -in key.pem -RSAPublicKey_out -out pubkey.pemUses legacy format

📖 SYNOPSIS

openssl rsa [-help] [-inform DER|PEM|P12|ENGINE] [-outform DER|PEM]
       [-in filename|uri] [-passin arg] [-out filename] [-passout arg]
       [-aes128] [-aes192] [-aes256] [-aria128] [-aria192] [-aria256]
       [-camellia128] [-camellia192] [-camellia256] [-des] [-des3] [-idea]
       [-text] [-noout] [-modulus] [-traditional] [-check] [-pubin] [-pubout]
       [-RSAPublicKey_in] [-RSAPublicKey_out] [-pvk-strong] [-pvk-weak]
       [-pvk-none] [-engine id] [-provider name] [-provider-path path]
       [-propquery propq]

📝 DESCRIPTION

This command processes RSA keys. They can be converted between various forms and their components printed out.

âš™ī¸ OPTIONS

📌 NOTES

The openssl-pkey(1) command is capable of performing all the operations this command can, as well as supporting other public key types.

💡 EXAMPLES

The documentation for the openssl-pkey(1) command contains examples equivalent to the ones listed here.

Remove the pass phrase on an RSA private key:

openssl rsa -in key.pem -out keyout.pem

Encrypt a private key using triple DES:

openssl rsa -in key.pem -des3 -out keyout.pem

Convert a private key from PEM to DER format:

openssl rsa -in key.pem -outform DER -out keyout.der

Print out the components of a private key to standard output:

openssl rsa -in key.pem -text -noout

Just output the public part of a private key:

openssl rsa -in key.pem -pubout -out pubkey.pem

Output the public part of a private key in RSAPublicKey format:

openssl rsa -in key.pem -RSAPublicKey_out -out pubkey.pem

🐛 BUGS

There should be an option that automatically handles .key files, without having to manually edit them.

📚 SEE ALSO

openssl(1), openssl-pkey(1), openssl-pkcs8(1), openssl-dsa(1), openssl-genrsa(1), openssl-gendsa(1)

📜 HISTORY

The -engine option was deprecated in OpenSSL 3.0.

ÂŠī¸ COPYRIGHT

Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.

openssl-rsa(1)
📝 NAME 🚀 Quick Reference 📖 SYNOPSIS 📝 DESCRIPTION âš™ī¸ OPTIONS 📌 NOTES 💡 EXAMPLES 🐛 BUGS 📚 SEE ALSO 📜 HISTORY ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.26-1-g511901d Author: Che Dong Under GNU General Public License
2026-08-07 07:56 @216.73.216.207
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format