-
-
Save trung85/f6ef60493324846a0881a6d77cc623f0 to your computer and use it in GitHub Desktop.
Generate RSA keypair (public, private + pkcs8) using openssl command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Private key | |
| openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048 | |
| # Public key | |
| openssl rsa -pubout -in private.pem -out public_key.pem | |
| # Private key in pkcs8 format (for Java maybe :D) | |
| openssl pkcs8 -topk8 -in private.pem -out private_key.pem | |
| ## nocrypt (Private key does have no password) | |
| openssl pkcs8 -topk8 -in private.pem -nocrypt -out private_key.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment