Last active
September 15, 2022 02:43
-
-
Save help-14/db3bcfe02ba4414845638bcfc8ee99e9 to your computer and use it in GitHub Desktop.
RSA cheatsheet
This file contains 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
# generate a private key with the correct length | |
openssl genrsa -out private-key.pem 2048 | |
# generate corresponding public key | |
openssl rsa -in private-key.pem -pubout -out public-key.pem | |
# optional: create a self-signed certificate | |
openssl req -new -x509 -key private-key.pem -out cert.pem -days 360 | |
# optional: convert pem to pfx | |
openssl pkcs12 -export -inkey private-key.pem -in cert.pem -out cert.pfx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment