Created
May 1, 2016 17:33
-
-
Save jonekdahl/4bcaf67e47e848fbb37ad8ddcb508e6a to your computer and use it in GitHub Desktop.
OpenSSL RSA keypair generation and inspection
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
| 1. Generate a private key | |
| `openssl genpkey -algorithm RSA -out signing-private-key.pem -pkeyopt rsa_keygen_bits:2048` | |
| 2. Extract the public key | |
| `openssl rsa -pubout -in signing-private-key.pem -out signing-public-key.pem` | |
| 3. The key pair can be inspected like this | |
| `openssl rsa -text -in signing-private-key.pem -noout` | |
| `openssl rsa -in signing-public-key.pem -pubin -text -noout` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment